The operator > and < are meaningful when used with pointers, if
a) The pointers point to data of similar type
b) The pointers point to structure of similar data type
c) The pointers point to elements of the same array
d) None of these
Which of the following is the correct ways of declaring a float pointer:
a) float ptr;
b) float *ptr;
c) *float ptr;
d) None of the above
Prior to using a pointer variable it should be
a) initialized
b) Declared
c) Both A and B
d) None of these
What is the base data type of a pointer variable by which the memory would be allocated to it?
a) int
b) float
c) No datatype
d) Depends upon the type of the variable to which it is pointing
e) unsigned int
Prior to using a pointer variable it should be
a) Declared
b) Initialized
c) Both declared and initalized
d) None of these
Explanation: Using a pointer variable, without initializing it, will be disastrous, as it will have a garbage value.
In C a pointer variable to an integer can be created by the decalaration
a) int p*;
b) int *p;
c) int +p;
d) int $p;