Tuesday, January 12, 2010

UNIT – 6
POINTERS IN C

1) ____ is the variable that store the memory address of other variables.
a) *pointer b)integer c)character d)None
2) ____ symbol is used to get the address of the variable.
a)# b)*& c)* d) None
3) Dereferencing is done with the unary operator _____.
a)* * b)& c)# d) None
4) *ptr=&x; is a valid statement ?
a)false b)*true c)none
5) Address operator is ______
a)# b)*& c)* d) None
6) ____ is the format specifier for memory address.
a)%d b)*%p c)%f d)None
7) ______ allows the data at the memory address to be modified.
a)*Dereferencing b)addressing c) a & b d)None
8) Pointers can be incremented, decremented and manipulated using
arithmetic expressions.[ true/false] a)*True b)false c) None
9) In array, first element position is ______
a)*0 b) 1 c)2 d) None
10) X should return the value of ______ array.
a)*first value b)last value c)middle value d)None


11) ++p is _______ increment.
a)*pre b)post c)middle d) None
12) Pointers are particularly useful for manipulating _____ .
a)*strings b)integers c)float d) None
13) ______ returns the current value that the pointer is pointing to and then moves the pointer one step forward.
*a) *(ptr++) b)*ptr++ c)ptr*++ d)none
14) _______ gives the number of elements between ptr1 and ptr2.
*a)ptr2 – ptr1 b)ptr1 – ptr2 c)*ptr2 - *ptr1 d)None
15) _____ the contents of the address contained in ptr3 are assigned to the contents of the address contained in ptr4.
a)*ptr4=ptr3 *b)*ptr4 = *ptr3 c)ptr4 = ptr3 d) None



UNIT – 6
POINTERS IN C
1 A 2 B 3 A 4 B 5 B
6 B 7 A 8 A 9 A 10 A
11 A 12 A 13 A 14 A 15 B