Input & Output
- What does the following command line signify?
prog1|prog2
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
It runs both the programs, pipes output of prog1 to input of prog2
- For a typical program, the input is taken using _________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
For a typical program, the input is taken using Files, Command-line and scanf.
- Which among the following is the odd one out?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
scanf
- What will be the output of the following C code?
#include <stdio.h>
#include <string.h>
int main()
{
char line[];
fgets(line, 25, stdin);
printf("%d\n", strlen(line));
return 0;
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
Compilation Error
main.c: In function ‘main’:
main.c:5:14: error: array size missing in ‘line’
char line[];
- gets() and puts() operate on ___________
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
stdin and stdout