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

91. Which of the following statements are correct ?

  • It is possible for a function to access a variable that is local to another function
  • Two local variables may have the same name
  • The scope of a local variable should be a function
  • The scope of a local variable may be a single statement.
Show Answer Report

92. The default parameter passing mechanism is

  • call by value
  • call by reference
  • call by value result
  • none of the above
Show Answer Report

93. Choose the correct statements.

  • During external variable definition, storage is set aside by the compiler
  • During external variable declaration, no storage is set aside by the compiler
  • The use of external variables may make debugging difficult
  • None of the above
Show Answer Report

94. The storage class static can be used to

  • restrict the scope of an external identifier
  • preserve the exit value of variables
  • provide privacy to a set of functions
  • none of the above
Show Answer Report

95. The following program main() {printf ("tim"); main ();}

  • is illegal
  • keeps on printing tim
  • prints tim once
  • none of the above
Show Answer Report

96. Consider the following program main() { putchar ('M'); first (); putchar ('m');} first () { _______ } second() { putchar ('d');} If madam is the required output, then the body of first () must be

  • empty
  • second(); putchar ('a');
  • putchar ('a'); second (); printf ("%c", 'a')'
  • none of the above
Show Answer Report

97. Use of functions

  • helps to avoid drepeating a set of statements many times
  • enhances the logical clarity of the program
  • helps to avoid repeated programming across programs
  • makes the debugging task easier
Show Answer Report

98. Which of the following comments about wide character is/are true ?

  • It is the binary representation of a character in the extended binary set.
  • It is of intege type wchar_t
  • End of file is represented by WEOF.
  • None of the above
Show Answer Report

99. Pick the correct statements.

  • The body of a function should have only one returnf statement.
  • The body of a function may have many return statements.
  • A function can return only one value to the calling environment
  • If return statement is omitted, then the function does itsd job but returns no value to the calling environment.
Show Answer Report

100. max is a function that returns the larger of the two integers, given as arguments. Which of the following statements finds the largest of three given numbers ?

  • max (max (a, b), max (a, c))
  • max (a, max (a, c))
  • max (max (a, b ), max (b, c))
  • max (b, max (a, c))
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test