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

Explain which function in c can be used to append a string to another string?

0 Answers  


Is there sort function in c?

0 Answers  


Which of the following is not an infinite loop ? a.while(1){ .... } b.for(;;){ ... } c.x=0; do{ /*x unaltered within theloop*/ ... }while(x==0); d.# define TRUE 0 ... while(TRUE){ .... }

7 Answers   TCS,


for example user gives input as " 20 or 20.0 or rs 20.0 or 20.00 or rs20 and so .. on " and the output should be stored as " rs.20.00 " in a variable

2 Answers  


what is uses of .net

0 Answers  






diff .between strcture and union

2 Answers  


what are the general concepts of c and c++

2 Answers  


What is the difference between c and python?

0 Answers  


using for loop sum 2 number of any 4 digit number in c language

0 Answers  


program to find middle element of linklist?

1 Answers   Huawei,


What is the difference between %d and %*d in C

3 Answers  


Consider a language that does not have arrays but does have stacks as a data type.and PUSH POP..are all defined .Show how a one dimensional array can be implemented by using two stacks.

3 Answers   Google,


Categories