Humanities/Arts Exam  >  Humanities/Arts Questions  >  What will the following statement do?FILE *fp... Start Learning for Free
What will the following statement do?
FILE *fp1;
Char Tch;
fp1=fopen("TCY.c","r");
while((Tch=getc(fp1)) != EOF)
printf("%c",Tch);
  • a)
    Read characters from keyboard and store in TCY.c till the new line.
  • b)
    Read all characters from TCY.c and display on screen.
  • c)
    Read characters from keyboard and display on screen.
  • d)
    Show error in while loop
Correct answer is option 'B'. Can you explain this answer?
Most Upvoted Answer
What will the following statement do?FILE *fp1;Char Tch;fp1=fopen(&quo...
In this program, getc() function within the while loop will read the characters from TCY.c one by one and display on the screen through the variable Tch.
Explore Courses for Humanities/Arts exam

Top Courses for Humanities/Arts

What will the following statement do?FILE *fp1;Char Tch;fp1=fopen("TCY.c","r");while((Tch=getc(fp1)) != EOF)printf("%c",Tch);a)Read characters from keyboard and store in TCY.c till the new line.b)Read all characters from TCY.c and display on screen.c)Read characters from keyboard and display on screen.d)Show error in while loopCorrect answer is option 'B'. Can you explain this answer?
Question Description
What will the following statement do?FILE *fp1;Char Tch;fp1=fopen("TCY.c","r");while((Tch=getc(fp1)) != EOF)printf("%c",Tch);a)Read characters from keyboard and store in TCY.c till the new line.b)Read all characters from TCY.c and display on screen.c)Read characters from keyboard and display on screen.d)Show error in while loopCorrect answer is option 'B'. Can you explain this answer? for Humanities/Arts 2024 is part of Humanities/Arts preparation. The Question and answers have been prepared according to the Humanities/Arts exam syllabus. Information about What will the following statement do?FILE *fp1;Char Tch;fp1=fopen("TCY.c","r");while((Tch=getc(fp1)) != EOF)printf("%c",Tch);a)Read characters from keyboard and store in TCY.c till the new line.b)Read all characters from TCY.c and display on screen.c)Read characters from keyboard and display on screen.d)Show error in while loopCorrect answer is option 'B'. Can you explain this answer? covers all topics & solutions for Humanities/Arts 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for What will the following statement do?FILE *fp1;Char Tch;fp1=fopen("TCY.c","r");while((Tch=getc(fp1)) != EOF)printf("%c",Tch);a)Read characters from keyboard and store in TCY.c till the new line.b)Read all characters from TCY.c and display on screen.c)Read characters from keyboard and display on screen.d)Show error in while loopCorrect answer is option 'B'. Can you explain this answer?.
Solutions for What will the following statement do?FILE *fp1;Char Tch;fp1=fopen("TCY.c","r");while((Tch=getc(fp1)) != EOF)printf("%c",Tch);a)Read characters from keyboard and store in TCY.c till the new line.b)Read all characters from TCY.c and display on screen.c)Read characters from keyboard and display on screen.d)Show error in while loopCorrect answer is option 'B'. Can you explain this answer? in English & in Hindi are available as part of our courses for Humanities/Arts. Download more important topics, notes, lectures and mock test series for Humanities/Arts Exam by signing up for free.
Here you can find the meaning of What will the following statement do?FILE *fp1;Char Tch;fp1=fopen("TCY.c","r");while((Tch=getc(fp1)) != EOF)printf("%c",Tch);a)Read characters from keyboard and store in TCY.c till the new line.b)Read all characters from TCY.c and display on screen.c)Read characters from keyboard and display on screen.d)Show error in while loopCorrect answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of What will the following statement do?FILE *fp1;Char Tch;fp1=fopen("TCY.c","r");while((Tch=getc(fp1)) != EOF)printf("%c",Tch);a)Read characters from keyboard and store in TCY.c till the new line.b)Read all characters from TCY.c and display on screen.c)Read characters from keyboard and display on screen.d)Show error in while loopCorrect answer is option 'B'. Can you explain this answer?, a detailed solution for What will the following statement do?FILE *fp1;Char Tch;fp1=fopen("TCY.c","r");while((Tch=getc(fp1)) != EOF)printf("%c",Tch);a)Read characters from keyboard and store in TCY.c till the new line.b)Read all characters from TCY.c and display on screen.c)Read characters from keyboard and display on screen.d)Show error in while loopCorrect answer is option 'B'. Can you explain this answer? has been provided alongside types of What will the following statement do?FILE *fp1;Char Tch;fp1=fopen("TCY.c","r");while((Tch=getc(fp1)) != EOF)printf("%c",Tch);a)Read characters from keyboard and store in TCY.c till the new line.b)Read all characters from TCY.c and display on screen.c)Read characters from keyboard and display on screen.d)Show error in while loopCorrect answer is option 'B'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice What will the following statement do?FILE *fp1;Char Tch;fp1=fopen("TCY.c","r");while((Tch=getc(fp1)) != EOF)printf("%c",Tch);a)Read characters from keyboard and store in TCY.c till the new line.b)Read all characters from TCY.c and display on screen.c)Read characters from keyboard and display on screen.d)Show error in while loopCorrect answer is option 'B'. Can you explain this answer? tests, examples and also practice Humanities/Arts tests.
Explore Courses for Humanities/Arts exam

Top Courses for Humanities/Arts

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev