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

131. Let x be an array. which of the following operations are illegal ?

  • ++x
  • x + 1
  • x++
  • x * 2
Show Answer Report

132. If func is a function needing three arguments a1, a2, a3, then func can be invoked by

  • func(a1, a2, a3);
  • (*func) (a1, a2, a3);
  • *func(a1,. a2, a3);
  • all of the above
Show Answer Report

133. The declaration int (*p) [5]; means

  • p is a one dimensional array of size 5, of pointers to integers
  • p is a pointer to a 5 element integer array
  • the same as int *p[5]
  • none of the above
Show Answer Report

134. A function q that accepts a pointer to a character as argument and returns a pointer to an array of integer can be declared as

  • int (*q(char*))[]
  • int *q(char *)[]
  • int (*q) (char *) []
  • none of the above
Show Answer Report

135. In the previous question, printf ("%d", a**b); prints

  • 25
  • garbage
  • 0
  • an error message
Show Answer Report

136. Choose the correct statements.

  • Array stores data of the same type
  • Array can be a part of a structure
  • Array of structure is allowed
  • Structure stores data of the same type
Show Answer Report

137. a ----> b is syntactically correct if

  • a and b are structures
  • a is a structure and b is a pointer to a structure
  • a is a pointer to a structure and b is a structure
  • a is a pointer to structure in which b is a field
Show Answer Report

138. A file is preferable to an array of structures because

  • file lives even after the program that created it terminates
  • memory space will not be wasted
  • there are many system tools to manipulate files
  • there are language as well as system features to deal with files
Show Answer Report

139. If a file is opened in r+ mode then

  • reading is possible
  • writing is possible
  • it will be created if it does not exist
  • all the above comments are true
Show Answer Report

140. ftell

  • is a function
  • gives the current file position indicator
  • can be used to find the size of a file
  • is meant for cheeking whether a given file exists or not
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test