If the content of a file (input) is abc def. What will be the value of

Loading

โœช Choose the correct option.

If the content of a file (input) is abc def. What will be the value of input and ch?.


#include

char input[100],ch;

void main(void)

{

FILE *fp;

fp = fopen("input","rb");

fscanf(fp, "%s" ,&input);

fscanf(fp, "%c" ,&ch);

printf("%s %c", input, ch);

}

A. abc d
B. abc def
C. abc
D. None of these

Leave a Comment