Examveda

What will be the output of the following C code if following commands are used to run and if myfile does not exist?
gcc -o test test.c
./test > myfile

#include <stdio.h>
int main(int argc, char **argv)
{
    char c = 'd';
    putchar(c);
    printf(" %d\n", argc);
}

A. d 2 in myfile

B. d 1 in myfile

C. Depends on the system

D. Depends on the standard

Answer: Option B


This Question Belongs to C Program >> File Input Output

Join The Discussion

Related Questions on File Input Output