C Programming :: Input / Output - Discussion
Home > C Programming > Input / Output > MCQs Questions Discussion
7 / 6
What is the following C Program doing?
#include <stdio.h>
void main ()
{
char line [80];
gets (line);
puts (line);
}
#include <stdio.h>
void main ()
{
char line [80];
gets (line);
puts (line);
}
Aprints horizontal straight lines on screens
Bprints 80 vertical lines on screen
Creads in a line of 80 characters
Dreads and prints lines composed of characters
Answer: Option (Login/Signup)
Show Explanation
Asked In ::
STEP-BY-STEP
In line 3, we are declaring a character array 'line' of exactly 80 bytes. In the next line, 'gets' is used to read a line of text from standard input device(stdin), and in the next line 'puts' is used to print the string or line of text. So the coreect option is D.
Read Full Answer
Report Error
Please Login First Click Here