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


Please Help Members By Posting Answers For Below Questions

What is a floating point in c?

594


Why shouldn’t I start variable names with underscores?

621


can we have joblib in a proc ?

1650


Can 'this' pointer by used in the constructor?

608


Explain how do you determine the length of a string value that was stored in a variable?

664






How can I get random integers in a certain range?

609


What is typedef?

658


What is the difference between Printf(..) and sprint(...) ?

778


Why #include is used in c language?

588


What is modifier & how many types of modifiers available in c?

602


What is sorting in c plus plus?

561


What does it mean when a pointer is used in an if statement?

596


Explain what is a stream?

604


a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.

4536


How do you determine the length of a string value that was stored in a variable?

642