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
What is a floating point in c?
Why shouldn’t I start variable names with underscores?
can we have joblib in a proc ?
Can 'this' pointer by used in the constructor?
Explain how do you determine the length of a string value that was stored in a variable?
How can I get random integers in a certain range?
What is typedef?
What is the difference between Printf(..) and sprint(...) ?
Why #include is used in c language?
What is modifier & how many types of modifiers available in c?
What is sorting in c plus plus?
What does it mean when a pointer is used in an if statement?
Explain what is a stream?
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.
How do you determine the length of a string value that was stored in a variable?