C - Files and Preprocessors Questions and Answers

Practice Mode
Showing 10 of 96 questions
Q31
The function used for reading binary stream is
  • A read ( )
  • B fread ( )
  • C fscanf ( )
  • D all the above
Answer: Option B
Q32
Identify the functions for in-memory for mat conversions
  • A realloc ( )
  • B sprintf ( )
  • C sscanf( )
  • D both options b and c
Answer: Option D
Q33
The value of string after  exeecuting the following statements is int x = 25; char string [5]; sprintf ( string, "%d", x);
  • A "25"
  • B 25
  • C TWO FIVE
  • D 25000
Answer: Option A
Q34
The value of ch after executing the following statements is int x; char ch; char string [20] = "100 5"; sscanf (string, "%3d%d", &x, &ch);
  • A 5
  • B blank
  • C "5"
  • D NULL
Answer: Option B
Q35
Identify the correct statement.
  • A # include "filename"
  • B #include <filename>
  • C both options a and b
  • D #include filename
Answer: Option C
Q36
The following line in a program # represents
  • A an invalid code
  • B a null dirrective
  • C a comment
  • D a page number
Answer: Option B
Q37
Macros
  • A can be recursively defined
  • B cannot be recursively defined
  • C cannot be defined
  • D are not preprocessor facility
Answer: Option B
Q38
Identify the stringzing operator.
  • A a+
  • B ::
  • C #
  • D ##
Answer: Option C
Q39
idenfity the token pasting operator
  • A +
  • B ++
  • C #
  • D ##
Answer: Option D
Q40
The directive (s) used in conditional compilation is (are)
  • A #if
  • B #elif
  • C #else
  • D all the above
Answer: Option D
Questions and Answers for Competitive Exams Various Entrance Test