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
21. How does compiler diferentiate indirection operator from multiplication operator ?
- by using the number of operands
- by seeing the position of operand
- both options a and b
- by using the value of the operand
22. The address of operator returns
- the address of its operand
- Ivalue
- both options a and b
- rvalue
23. The indirection operator returns
- The data object stored in the address represented by its operand
- Ivalue
- both options a and b
- rvalue
24. The operrand of indirection operator is
- Pointer variable
- pointer expression
- both options a and b
- ordinary variable
25. The operand of address of operator may be
- an ordinary variable
- an array variable
- a pointer variable
- Any one of the above
26. identify the invalid Ivalue given int x, *p = &x;
- *(P +1)
- *(p-3)
- both options a and b
- &x
27. After the execution of the statement int x; the value of x is
- 0
- undefined
- 1
- -1
28. Pointer variable may be initialized using
- static memory allocation
- dynamic memory allocation
- both options a and b
- a positive integer
30. Assume 2 bytes for int, 4 bytes for float and 8 butes for double data types respectively, how may bytes are assigned to the following pointer variables ? int *ip; float *fp; double *dp;
- 2 bytes for ip, 4 bytes for fp and 8 butes for dp
- 2 bytes for all pointer variables ip, fp and dp
- one byte for ip, 2 bytes for fp nd 4 bytes for dp
- 2 bytes for ip and 8 bytes for each fp and dp