Basic C Programming MCQ Questions and Answers

Take Exam

Basic C Programming MCQ questions with answers help candidates master the fundamentals of C language — one of the most popular programming languages for beginners and interview aspirants. These programming questions and answers focus on syntax, operators, loops, functions, and data handling. Practicing C programming MCQs strengthens logic and helps students perform better in technical assessments by TCS, Infosys, HCL, and other top recruiters. Each question is designed to test conceptual understanding and problem-solving skills, making it ideal for both practice and revision before coding interviews or placement exams.

Basic C Programming MCQ

Showing 10 of 198 questions

161. C preprocessor

  • takes care of conditional compilation
  • takes care of macros
  • takes care of include files
  • acts before compilation
Show Answer Report

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 Report

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 Report

164. The use of macro in the place of functions

  • reduces execution time
  • reduces code size
  • increases execution time
  • increase code size
Show Answer Report

165. The process of transforming one bit pattern into another by bit-wise operations is called

  • masking
  • pruning
  • biting
  • chopping
Show Answer Report

166. The operation of a staircase switch best explains the

  • or operation
  • and operation
  • exclusive nor operation
  • exclusive or operation
Show Answer Report

167. a << 1 is equivalent to

  • multiplying a by 2
  • dividing a by 2
  • adding 2 to a
  • none of the above
Show Answer Report

168. The most significant bit will be lost in which of the following operations ?

  • >>
  • complementation
  • >>
  • none of the above
Show Answer Report

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 Report

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 Report
Questions and Answers for Competitive Exams Various Entrance Test