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
Show Answer
22. The address of operator returns
  • the address of its operand
  • Ivalue
  • both options a and b
  • rvalue
Show Answer
23. The indirection operator returns
  • The data object stored in the address represented by its operand
  • Ivalue
  • both options a and b
  • rvalue
Show Answer
24. The operrand of indirection operator is
  • Pointer variable
  • pointer expression
  • both options a and b
  • ordinary variable
Show Answer
25. The operand of address of operator may be
  • an ordinary variable
  • an array variable
  • a pointer variable
  • Any one of the above
Show Answer
26. identify the invalid Ivalue given int x, *p = &x;
  • *(P +1)
  • *(p-3)
  • both options a and b
  • &x
Show Answer
27. After the execution of the statement int x; the value of x is
  • 0
  • undefined
  • 1
  • -1
Show Answer
28. Pointer variable may be initialized using
  • static memory allocation
  • dynamic memory allocation
  • both options a and b
  • a positive integer
Show Answer
29. identify the invalid pointer operator.
  • &
  • *
  • >>
  • none of the above
Show Answer
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
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test