C-Pointers Question and Answer
C-Pointers Question and Answer
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
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;
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