C-Command Line Arguments Questions and Answers

Practice Mode
Showing 10 of 129 questions
Q71
To flush all output streams we can write
  • A fflush(stdout)
  • B fflush(NULL)
  • C fflush(ALL)
  • D None of these
Answer: Option A
Q72
Which of the following function is appropriate to read one character at a time ?
  • A fscanf()
  • B fgetc()
  • C read()
  • D fgets()
Answer: Option B
Q73
In what order do the two command line variablesl appear in the definition of main ?
  • A Count then argument array
  • B Argument array then count
  • C They don't appear in the definition of main
  • D There is only one argument.
Answer: Option A
Q74
The function unlik (filename) is used
  • A to remove link between file and buffer
  • B To remove the existing file from the directory
  • C To remove the contents of file only
  • D None of these
Answer: Option B
Q75
Which of the following function return NULL on end of the file ?
  • A fgetc()
  • B getw()
  • C fprintf()
  • D fgets()
Answer: Option D
Q76
O_CREAT command can
  • A Create new text file if not exist.
  • B Does not create new text file if not exist.
  • C If text file exist then overwrite it.
  • D None of these
Answer: Option A
Q77
Opening of file stream means
  • A An action of connecting buffer to device
  • B An action of connecting program to buffer
  • C File processing
  • D None of these
Answer: Option A
Q78
What does the argument count variable store ?
  • A The number of arguments
  • B The number of arguments plus one
  • C The number of arguments minus one
  • D The total size of the argument array
Answer: Option A
Q79
Find the output #include"stdio.h" void main ( ) { FILE *fp; int x; fp=fopen("xyz.txt","w"); x=fprintf(fp, "%d%d", 1, 2, 3); printf("%d" ,x); }
  • A 1
  • B 2
  • C 3
  • D None of these
Answer: Option B
Q80
Which of the following command directly writes into disk file ?
  • A fwrite()
  • B write()
  • C Both a and b
  • D None of these
Answer: Option B
Questions and Answers for Competitive Exams Various Entrance Test