Basic C Programming MCQ

Basic C Programming MCQ
161. C preprocessor
  • takes care of conditional compilation
  • takes care of macros
  • takes care of include files
  • acts before compilation
Show Answer
162. A preprocessor command
  • need not start on a new line
  • need not start on the first column
  • has # as the first character
  • comes before the first executable statement
Show Answer
163. Choose the correct statement.
  • The scope of macro definition need not be the entire program.
  • the scope of a macro definition extends from the point of definition to the end of the file.
  • New line is macro definition delimiter.
  • A macro definition may go beyond a line.
Show Answer
164. The use of macro in the place of functions
  • reduces execution time
  • reduces code size
  • increases execution time
  • increase code size
Show Answer
165. The process of transforming one bit pattern into another by bit-wise operations is called
  • masking
  • pruning
  • biting
  • chopping
Show Answer
166. The operation of a staircase switch best explains the
  • or operation
  • and operation
  • exclusive nor operation
  • exclusive or operation
Show Answer
167. a << 1 is equivalent to
  • multiplying a by 2
  • dividing a by 2
  • adding 2 to a
  • none of the above
Show Answer
168. The most significant bit will be lost in which of the following operations ?
  • >>
  • complementation
  • >>
  • none of the above
Show Answer
169. Assume an unsigned integer occupies 1 byte. Let myVar be an unsigned integer. then myVar << 1 multiplies myVar by 2 if it is not greater than
  • 127
  • 255
  • 256
  • 128
Show Answer
170. If the bit pattern corresponding to a signed integer is shifted to the right then
  • vacant bit will be filled by the sign bit
  • vacant bit will be filled by 0
  • the outcome is implementation dependent
  • none of the above
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test