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 |
What is the output of the following program main();{printf ("chennai""superkings"}; a. Chennai b. superkings c. error d. Chennai superkings
Sir i need notes for structure,functions,pointers in c language can you help me please
What is the advantage of a random access file?
Write a program to know whether the input number is an armstrong number.
code for reverse alternate words from astring
which one low Priority in c? a)=,b)++,c)==,d)+
void swap(int a,int b) { a=a+b; b=a-b; a=a-b; } in this code always gives the same result for all case
Explain continue keyword in c
What is string in c language?
Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.
Write a C function to search a number in the given list of numbers. donot use printf and scanf
Write a program in c to input a 5 digit number and print it in words.