C-Command Line Arguments Questions and Answers
Practice ModeShowing 10 of 129 questions
Q11
Find the output
#include"stdio.h"
void main ( )
{
FILE *p;
char ch;
p=fopen ("raja.txt", "w");
putc (50,p);
putc (80, p);
putc (70, p);
while ((ch=getc(p))!=EOF)
putch (ch);
fclose (p);
}
Answer: Option B
Q12
Which of the following are similar ?
Answer: Option C
Q13
What is the contents of the file "letter.txt"
#include"stdio.h"
void main ( )
{
FILE *p;
char m[ ] = "I \m \the \best";
p=fopen (letter.txt", "w");
fputs (m,p);
fclose (p);
}
Answer: Option B
Q14
On error create ( ) returns
Answer: Option C
Q15
The fclose ( ) function
Answer: Option A
Q16
The fseek ( ) function
Answer: Option D
Q17
Find the output
#include "stdio.h"
void main ( )
{
FILE *p;
printf ("%d %d", stderr->fd, _streams[3].fd);
}
Answer: Option A
Q18
How many data members are present in FILE structure ?
Answer: Option C
Q19
MS-WORD is a
Answer: Option B
Q20
Find the output
#include "stdio.h"
void main ( )
{
FILE *p=0;
p++;
printf("%d",p);
}
Answer: Option B