diff. between *p and **p
Answers were Sorted based on User's Feedback
Answer / virag shah
*p is a simple pointer which holds the address of another
variable.
while **p is a double pointer which holds address of the
pointer in which actual address of the another variable is
stored.
Is This Answer Correct ? | 30 Yes | 1 No |
Answer / abhijeet kankani
Ya,the person is riht *p is just pointer which holds the
address of any variable(identifier)
where as **p is pointer to pointer which holds
address of another pointer
Is This Answer Correct ? | 8 Yes | 1 No |
Answer / sivavendra
yeah,,,its right,,,
*p is a ptr tat holds the address of another variable....where as **p is a double ptr which hold the address of another pointer and that pointer hold the address of the data....
Is This Answer Correct ? | 0 Yes | 0 No |
main() { char *p1="Name"; char *p2; p2=(char *)malloc(20); while(*p2++=*p1++); printf("%s\n",p2); } what is the output?
7 Answers AMCAT, HCL, Ramco, Zycus Infotech,
Explain what are global variables and explain how do you declare them?
what is pointer ? what is the use of pointer?
Can you explain the four storage classes in C?
which of the following go out of the loopo if expn 2 becoming false a.while(expn 1){...if(expn 2)continue;} b.while(!expn 1){if(expn 2)continue;...} c.do{..if(expn 1)continue;..}while(expn 2); d.while(!expn 2){if(expn 1)continue;..}
Explain what is a pragma?
What is the purpose of Scanf Print, getchar, putchar, function?
Explain the use of function toupper() with and example code?
What is #define in c?
consider the following C code main() { int i=3,x; while(i>0) { x=func(i); i--; } int func(int n) { static sum=0; sum=sum+n; return(sum); } the final value of x is
define string ?
Explain pointer. What are function pointers in C?