What is the difference between null pointer and the void
pointer?
Answers were Sorted based on User's Feedback
Answer / vignesh1988i
NULL POINTER:
this pointer returns null value to the main function......
it cant be type casted.........
VOID POINTER:
this pointer has a special advantages that it can point
to any value (int , char, float etc) when its type casted
for eg:
main()
{
char *p;
int n;
(int *)p=&n;
so on the above character pointer is been type casted to
point an integer value n;
Is This Answer Correct ? | 11 Yes | 3 No |
Answer / sunitha
null pointer : used to compair a pointer to any object or
a function and returns a null value to the main function.
void pointer : void pointer ia pointer which does not have
any return type and it can be easily type casted with other
type of pointers.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / vaibhav
null pointer contain null value . it doesn't contain any
value.
while void pointer is a pointer that cascade at a runtime.
i.e it casting at runtime
Is This Answer Correct ? | 3 Yes | 3 No |
Go through this linked list concept.While traversing through the singly linked list sometimes the following code snippet "while(head != NULL)" is used and other times "while(head->link != NULL)"is used(Here head is the pointer pointing to the first node,node has two parts data part and link part).What is the difference between head != NULL and Head->link != NULL and in which situation are they used?
List some basic data types in c?
main() { printf(5+"good morning"); printf("%c","abcdefgh"[4]); }the o/p is morning and e...how someone explain
Write a program to compute the following 1!+2!+...n!
What is an expression?
What's the total generic pointer type?
What is a program flowchart and explain how does it help in writing a program?
What are header files and what are its uses in C programming?
What is variable declaration and definition in c?
Why is extern used in c?
How can I read a directory in a C program?
2 Answers Bright Outdoor, Wipro,
When should a type cast not be used?