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

71. Consider the array definition int num [10] = (3, 3, 3); Pick the correct answers.

  • num[9] is the last element of the array num
  • The value of num [8] is 3
  • The value of num [3] is 3
  • None of the above
Show Answer Report

72. Consider the following type definition typedef char x[10]; x myArray [5]; What will sizeof(my Array) be? Assume one character occupied 1 byte)

  • 15 bytes
  • 10 bytes
  • 50 bytes
  • 30 bytes
Show Answer Report

73. While passing an array as an actual argument, the function call must have the array name

  • with empty brackets
  • with its size
  • alone
  • none of the above
Show Answer Report

74. The following program main () { Static int a[] = {7, 8, 9} printf ("%d", 2[a]) + a[2]));}

  • results in bus error
  • results in segmentation violation error
  • will not compile successfully
  • none of the above
Show Answer Report

75. The parameter passing mechanism for an array is

  • call by value
  • call by value-result
  • call by reference
  • none of these
Show Answer Report

76. Consider the statement int val[2] [4] = {1, 2, 3, 4, 5, 6, 7, 8,}; 4 will be the value o

  • val [1] [4]
  • val [0] [4]
  • val [1] [1]
  • none of the above
Show Answer Report

77. The maximum number of dimension an array can have C is

  • 3
  • 4
  • 5
  • compiler dependent
Show Answer Report

78. The following program fragment int m, n, b = m n = 8; char wer [80]; sprintf (wer, "%d%d%d", m n, b); puts (wer);

  • prints the string 8 8 8
  • prints the string 888
  • prints the null string
  • none of the above
Show Answer Report

79. Under which of the following conditions, the size of an one-dimensional array need not be specified?

  • when initialization is a part of definition
  • when it is a declaration
  • when it is a formal parameter
  • when it is an actual argument
Show Answer Report

80. If a two dimensional array is used as a formal parameter, then

  • both the subscripts may be left empty
  • the first (row) subscript may be left empty
  • the first subscript must be left empty
  • both the subscripts must be left empty
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test