Pointers Questions and Answers
Pointers questions with answers are a crucial part of C programming preparation, often included in technical interviews and MCQ-based exams. Pointers are variables that store the memory address of other variables, making them fundamental to dynamic memory management and efficient program design. These C programming MCQ questions and answers help students understand pointer arithmetic, function pointers, arrays, and memory allocation. Commonly asked in placement exams by TCS, Infosys, and Wipro, mastering pointer concepts gives you a competitive edge in coding tests and programming interviews.
Pointers
Showing 10 of
217 questions
34. The function used for dynamic deallocation of memory is
- destroy ( )
- delete ()
- free ()
- remove ()
35. The function call realloc (ptr, 0) is
- same as free (ptr)
- used to clear the values in the address represented by ptr
- used to set the value of ptr to be ()
- invalid
36. In the expression *cp++
- *cp is evaluated first and *cp is incremented by 1.
- *cp is evaluated first and cp is incremented by 1.
- cp is incremented by 1 first and * is applied.
- cp is incremented by 1 first and * is applied to the previous value of cp.
37. The pointers can be used to achieve
- call by function
- call by reference
- call by name
- call by procedure
38. The operators &, *, ++ and -- have
- same precedence level and same assoiativity
- same associativity and different precedence level
- different precedence level and different associativity
- different precedence level and same associativity
39. Identify the invalid expression for given syntax: float fnum [10], *fptr = fnum;
- fjum + 4
- fptr[4]
- fnum=++fptr
- &fnum[4]
40. Identify the correct statement for given expression float fnum [10];
- fnum is a pointer variable.
- fnum is a fixed address and not a variable
- fnum is an array variable.
- fnum is an address that can be modified.