Basic C Programming MCQ
Basic C Programming MCQ
121. The statement int **a;
- is illegal
- is legal but meaningless
- is syntactically and semantically correct
- none of the above
122. Which of the following operators can be applied to pointer variable(s) ?
- Division
- Multiplication
- Casting
- None of the above
123. Pointers are of
- integer datatype
- character datatype
- unsigned integer datatype
- none of these
124. The address operator &, cannot act on
- R-values
- arithmetic expressions
- members of a structure
- local variables
125. A pointer variable can be
- passed to a function as argument
- changed within a function
- returned by a function
- returned by a function
126. A string that is a formal parameter can be declared
- an array with empty braket
- a pointer to charcter
- a pointer to a character
- none of the above
127. Choose the correct statements.
- An entire array can be passed as argument to a function.
- A part of an array can be passed as argument to a function.
- Any change done to an array that is passed as an argument to a function will be local to the function.
- None of these
128. If x is an array of integer, then the value of &x [x] is same as that of
- &x [i+1] + sizeof (int)
- x + sizeof (int) + 1
- x + i
- ++ (&x[i])
129. Pick the correct answers.
If x is an one dimensional array, then
- & x [i] is same as x + i -1
- * (x + i) is same as * (&x[i])
- * (x + i ) is same as x [i]
- * (x + i ) is same as *x + i
130. Let x be an array. Which of the following cannot be present in the left hand side of an assignment statement?
- x
- x + i
- * (x + i)
- &x[i]