f(*p)
{
p=(char *)malloc(6);
p="hello";
return;
}
main()
{
char *p="bye";
f(p);
printf("%s",p);
}
what is the o/p?
Answer Posted / fazlur rahaman naik
actually the above programme produces an error.because u've
to mention which type of pointer it is at fuction f(*p).
i.e f(char *p).
if u correct this error.then the out put will be
bye
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
Compare array data type to pointer data type
What is this infamous null pointer, anyway?
What is a structural principle?
What would be an example of a structure analogous to structure c?
Explain how do you list files in a directory?
what are the different storage classes in c?
What is the purpose of realloc()?
What is variable and explain rules to declare variable in c?
what do u mean by Direct access files? then can u explain about Direct Access Files?
Where we use clrscr in c?
What are nested functions in c?
Is c is a low level language?
If I have a char * variable pointing to the name of a function ..
Combinations of fibanocci prime series
What is merge sort in c?