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 |
write a program that will accept two integers and will implement division without using the division operator if the second value is an odd number and will implement multiplication without using multiplication operator if the second value is an even number.
Write a program to add the following ¼+2/4+3/4+5/3+6/3+... (Like up to any 12 no.s)
main() { int i=0; while(+(+i--)!=0) i-=i++; printf(i); }
Is there a way to jump out of a function or functions?
Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant
write a c program to add two integer numbers without using arithmetic operator +
#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }
What is the explanation for prototype function in c?
convert 0.9375 to binary
What are qualifiers and modifiers c?
How can I dynamically allocate arrays?
Why do we need a structure?