C Programming INTERVIEW QUESTIONS
17. |
What is wild pointer? |
|
- Wild pointers are also known as dangling pointers.
- Pointers that do not point to valid object of the appropriate type, or to a distinguished null pointers value in language which support this.
|
18. |
What are the drawbacks of pointer? |
|
- Since the pointers point to a memory location issues of dangling pointers and wild pointers can occur.
-
Dangling pointers are those pointers when the data at which they are pointed may have been modified or deleted.
-
But still the pointer points to that location.
-
The pointers that are not initialized lead to wild pointers because they will be pointing to some arbitrary memory.
-
Also, memory leaks occur, if a memory is not released.
|
19. |
What is the difference between while(a) and while(!a)? |
|
While(a) means while(a!=0)
While(!a) means while(a==0)
|
20. |
Execution of a C program starts from which function? |
|
Always, execution of a C program starts from main() function. |