Home » C Programming » Input & Output » Question
  1. What will be the output of the following C code if following commands are used to run and if Newfile does not exist?
    gcc -o test test.c
    ./test > Newfile

    #include <stdio.h>
    int main(int argc, char **argv)
    {
    char ch = 'N';
    putchar(ch);
    printf(" %d\n", argc);
    }
    1. Depends on the standard
    2. Depends on the system
    3. N 2 in Newfile
    4. N 1 in Newfile
    5. None of these
Correct Option: D

N 1 in Newfile



Your comments will be displayed only after manual approval.