InterviewSolution
Saved Bookmarks
| 1. |
What is pointer & why it is used? |
|
Answer» The pointer is nothing but a variable that stores and points the address or location of a different variable. While a regular variable stores the VALUE of a variable, a pointer variable stores the address or location of a variable. Why it is used?You can USE pointers in a C program for getting the location of a variable, or for achieving pass by call reference. This is because pointers ALLOW various functions to modify and share the local variables. You can ALSO use a pointer for implementing “linked” data structures, such as lists and binary trees. Have you read our REST of the Interview Questions on C? |
|