Question:
How are pointer variables initialized?
Answer:
Pointer variable are initialized by one of the following two ways<br><br>Ø Static memory allocation<br><br>Ø Dynamic memory allocation Source: CoolInterview.com
Pointers are again variables which hold addresses. Hence, there is no special way of initializing pointer variables. However, towards achieving that perfect code, most programmers initialize the pointers to NULL if they wish to allocate memory at run time using malloc(). Source: CoolInterview.com
Answered by: Ravi A Joshi | Date: 6/28/2009
| Contact Ravi A Joshi
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|