C-Command Line Arguments Questions and Answers

Practice Mode
Showing 10 of 129 questions
Q51
The fcloseall() function
  • A Closes all filesl except stdprn and stderr
  • B Closes all files except stdin and stdout
  • C It returns the name of the last file closed
  • D None of these
Answer: Option D
Q52
Stream oriented files are accessed through
  • A system call
  • B Library functions
  • C Linker
  • D Loader
Answer: Option B
Q53
What are the two predefined FILE pointes in c?
  • A stdout and stderr
  • B console and error
  • C stdout and stdin
  • D stdio and stderr
Answer: Option C
Q54
Low level files are accessed through
  • A System call
  • B Library functions
  • C Linker
  • D Loader
Answer: Option A
Q55
If an error occurs, the function fseek() returns
  • A Non zero
  • B Zero
  • C No value
  • D -1
Answer: Option A
Q56
A file pointer is
  • A A stream pointer
  • B A buffer pointer
  • C A pointer to a FILE data type
  • D All of the above
Answer: Option C
Q57
Find the output #include "stdio.h" void main( ) { int x=10; char ch[10]; sprintf(ch,"%d",x); printf("%s",ch); }
  • A 25
  • B Garbage value
  • C Compilation error
  • D None of these
Answer: Option D
Q58
When fopen( ) fails to open a file it returns
  • A NULL
  • B -1
  • C 1
  • D None of these
Answer: Option A
Q59
The function used for writing a character into a file is
  • A putc()
  • B fputc()
  • C fputchar()
  • D Both a and b
Answer: Option D
Q60
An I/O stream can be
  • A A text stream
  • B A binary stream
  • C Both a and b
  • D None of these
Answer: Option C
Questions and Answers for Competitive Exams Various Entrance Test