Basic C Programming MCQ Questions and Answers

Practice Mode
Showing 10 of 198 questions
Q121
The statement int **a;
  • A is illegal
  • B is legal but meaningless
  • C is syntactically and semantically correct
  • D none of the above
Answer: Option C
Q122
Which of the following operators can be applied to pointer variable(s) ?
  • A Division
  • B Multiplication
  • C Casting
  • D None of the above
Answer: Option C
Q123
Pointers are of
  • A integer datatype
  • B character datatype
  • C unsigned integer datatype
  • D none of these
Answer: Option D
Q124
The address operator &, cannot act on
  • A R-values
  • B arithmetic expressions
  • C members of a structure
  • D local variables
Answer: Option
Q125
A pointer variable can be
  • A passed to a function as argument
  • B changed within a function
  • C returned by a function
  • D returned by a function
Answer: Option
Q126
A string that is a formal parameter can be declared
  • A an array with empty braket
  • B a pointer to charcter
  • C a pointer to a character
  • D none of the above
Answer: Option
Q127
Choose the correct statements.
  • A An entire array can be passed as argument to a function.
  • B A part of an array can be passed as argument to a function.
  • C Any change done to an array that is passed as an argument to a function will be local to the function.
  • D None of these
Answer: Option
Q128
If x is an array of integer, then the value of &x [x] is same as that of
  • A &x [i+1] + sizeof (int)
  • B x + sizeof (int) + 1
  • C x + i
  • D ++ (&x[i])
Answer: Option C
Q129
Pick the correct answers. If x is an one dimensional array, then
  • A & x [i] is same as x + i -1
  • B * (x + i) is same as * (&x[i])
  • C * (x + i ) is same as x [i]
  • D * (x + i ) is same as *x + i
Answer: Option
Q130
Let x be an array. Which of the following cannot be present in the left hand side of an assignment statement?
  • A x
  • B x + i
  • C * (x + i)
  • D &x[i]
Answer: Option
Questions and Answers for Competitive Exams Various Entrance Test