[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

C Programming :: File Input/Output - Discussion

Home > C Programming > File Input/Output > MCQs Questions Discussion

1 / 12

What is the output of the following 'C' program ?

#include <stdio.h>
void main()
{
FILE *ptr; 
char i; 
ptr=fopen("abc","r"); 
while((i=fgets(ptr))!=EOF)
printf("%c",i);
}

Acontents of abc followed by an infinite loop

BCompilation Error

CContents of abc

DNone of these

Answer: Option (Login/Signup)

Show Explanation

Asked In ::

Post Your Answer Here:     

No Discussion on this question yet!