52.
What will be the output of the following C code?
#include  <stdio.h>
int main()
{
    char c;
    int i = 0;
    FILE *file;
    file = fopen("test.txt", "w+");
    fprintf(file, "%c", 'a');
    fprintf(file, "%c", -1);
    fprintf(file, "%c", 'b');
    fclose(file);
    file = fopen("test.txt", "r");
    while ((c = fgetc(file)) !=  -1)
        printf("%c", c);
    return 0;
}

Read More Section(C Fundamentals)

Each Section contains maximum 100 MCQs question on C Fundamentals. To get more questions visit other sections.