How will you allocate memory to double a pointer?



How will you allocate memory to double a pointer?..

Answer / pavan135

main()
{
char *pch; **ppch;

pch = malloc(100);
if(pch == NULL)
return -1;
ppch = &pch;

}

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More C Interview Questions

what is the diffrenet bettwen HTTP and internet protocol

0 Answers  


Write a programm such that if user enter 11.25 it roundup to 11 but if user enter 11.51 upto 11.99 it will round up to 12 i.e.;convert the floting point value into integer format as explain above..

2 Answers  


Why doesn't C support function overloading?

2 Answers  


Explain what are compound statements?

0 Answers  


What is period operator in c?

3 Answers   Wipro,






Can we change the value of static variable in c?

0 Answers  


Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?

0 Answers  


#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }

0 Answers   Wilco,


Explain what is page thrashing?

0 Answers  


Can i use “int” data type to store the value 32768? Why?

0 Answers  


what is an inline function?

2 Answers   TCS,


Is c functional or procedural?

1 Answers  


Categories