C Programming - Pointers - Discussion

Discussion Forum : Pointers - Yes / No Questions (Q.No. 3)
3.
Is the NULL pointer same as an uninitialised pointer?
Yes
No
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
14 comments Page 1 of 2.

Gazzye said:   2 decades ago
A Null pointer is one which holds 0 (zero) as its value and uninitialized pointer may have some garbage value. To check this out we can print the value of pointer.

Bhuvana said:   1 decade ago
Ya it will hold the garbage value.

A jain said:   1 decade ago
I agree with gazzye.

Harry said:   1 decade ago
NO, uninitialized pointer will not always be holding the garbage value. It will hold garbage value when it is declared locally and it will hold 0 value when it is declared locally.

Nikila said:   1 decade ago
UNINITIALIZED pointers are called as wild pointers which may cause a problem in execution. It is must to initialize the pointers.

MaDDy said:   1 decade ago
Unintialized pointer will be pointing to any garbage value
like int* p;
Initialized pointer will be pointing to a valid value in the memory
like int* p = &a; where a is an integer type containing some value

Ramya said:   1 decade ago
In pointers we didn't intialize the value we get the error.so we must intilaze the value.other wise we get the error.

Upendra.K said:   1 decade ago
A null pointer refers the zero value whereas the uninitialized value may refers to the garbage value depending on the declarations.

Anshu Sharma said:   1 decade ago
A NULL pointer is always pointing to NOTHING and hold the "0" value and in case of Uninitialized pointer which may point to any GARBAGE value.

Pooja said:   1 decade ago
Because we take a space in memory so the option B is right it hold null value but the memory is allocated so.


Post your comments here:

Your comments will be displayed after verification.