what is void pointer?
Answers were Sorted based on User's Feedback
Answer / rajesh
Void pointer is the
pointer which itself is
null and can not be
interchanged by others.
Ex-
{
int *a;
void *b;
*a=*b; //valid
a=b; //invalid
}
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / sanjay bhosale
Void pointer is the pointer which can point to any type of variable.
e.g
int a=10;
float b=20.00f;
void *ptr=null;
ptr = &a;
ptr = &b;
Is This Answer Correct ? | 0 Yes | 0 No |
What is an volatile variable?
/*program to calculate hra,da in salary if salary less than 10000 then hra15%,da13% otherwise hra20%,da18%/*
#define swap1(a,b) a=a+b;b=a-b;a=a-b; main() { int x=5,y=10; swap1(x,y); printf("%d %d\n",x,y); swap2(x,y); printf("%d %d\n",x,y); } int swap2(int a,int b) { int temp; temp=a; b=a; a=temp; return; } what are the outputs?
what is the height of tree if leaf node is at level 3. please explain
What is the difference between formatted&unformatted i/o functions?
in b=6.6/a+(2*a+(3*c)/a*d)/(2/n); which operation will be performed first a) 6.6/a b) 2*a c) 3*c d) 2/n
Is c pass by value or reference?
What does typeof return in c?
how i m write c program 1.check prime number 2.prime number series
Explain how do you use a pointer to a function?
Write a routine that prints out a 2-D array in spiral order!
what is the difference between NULL & NUL keywords in C?