which of the following statement(s) best refer to pointers?
A) Pointer arithmetic is permitted on pointers of any type.
B) A c pointer of type void can be used to directly examine or modify
any object of any type
C) A c pointer knows the types of pointers and indirectly referenced
data items at runtime
D) All of above
why is the answer option C here?please explain why any option is right or wrong clearly…
Pointers mcq doubt
hello @kani001
a. Pointer arithmatic is not permitted on void pointers.
b.void pointers cannot be dereferenced and hence we cant modif
c. A pointer knows about its type at run time.
is there any way we can dereference void pointers like explicitly?how is that done…if so,why is option b not considered?
u need to type cast it and then u can derefrence
read this carefully->
(note the word directly i.e without explicitly typecasting).