Home » C Programming » Input & Output » Question
  1. What will be the output of the following C code if following commands are used to run(considering Newfile exists)?
    gcc -otest test.c
    ./test > Newfile

    #include <stdio.h>
    int main(int argc, char **argv)
    {
    char ch = 'U';
    putchar(ch);
    printf(" %d\n", argc);
    }
    1. U in Newfile and 1 in screen
    2. U in Newfile and 2 in screen
    3. U 1 in Newfile
    4. U 2 in Newfile
    5. None of these
Correct Option: C

U 1 in Newfile



Your comments will be displayed only after manual approval.