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

81. The following program main () { static char a[3][4] = {"abcd", "mnop", "fghi"}; putchar (**a); }

  • will not compile successfully
  • results in run-time error
  • prints garbage
  • none of the above
Show Answer Report

82. C does no automatic array bound checking. This is

  • true
  • false
  • C's asset
  • C's shorting
Show Answer Report

83. printf ("%10.5s", wer); outputs

  • NO SU
  • NO SUBSTIT
  • NO SU
  • UTE F
Show Answer Report

84. printf ("%-10.s", wer); outputs

  • NO SU
  • NO SUBSTIT
  • NO SU
  • UTE F
Show Answer Report

85. printf ("%-10.*s", hh, wer); outputs

  • NO SU
  • NO SUBSTITUTE FO
  • NO SU
  • error message
Show Answer Report

86. If n has the value 3, then the statement a[++n] = n++;

  • assigns 3 to a [5]
  • assign 4 to a[5]
  • assign 4 to a[4]
  • what is assigned is compiler-dependent
Show Answer Report

87. Choose the statement that best defines an array

  • It is a collection of items that share a common name.
  • It is a collection of items that share a common name and occupy consecutive memory locations.
  • It is collection of items of the same type and storage class that share a common name and occupy consecutive memory locations.
  • none of the above
Show Answer Report

88. Choose the correct statements.

  • Strictly speaking C support 1-dimensional arrays only.
  • An array element may be an array by itself.
  • Array elements need not occupy contiguous memory locations.
  • None of the above
Show Answer Report

89. The order in which actual arguments are evaluated in a function call

  • is from the left
  • is from the right
  • is compiler-dependent
  • none of the above
Show Answer Report

90. If a global variable is of storage class static, then

  • the static declaration is unnecessary if the entire source code is in a single file
  • the variable is recognized only in the file in which is defined
  • it results in a syntax error
  • none of the above
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test