File I/O


  1. stdout, stdin and stderr are ________











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    File pointers


  1. Which of the following statements about stdout and stderr are true?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    Both connected to screen by default



  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    FILE *fp = stdout;
    int num;
    fprintf(fp, "%d ", 105);
    fprintf(stderr, "%d ", 99);
    return 0;
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    105 99


  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    FILE *fp = stdout;
    int num;
    fprintf(fp, "%d\n ", 200);
    fprintf(stderr, "%d", 300);
    return 0;
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: E

    200
    300