f(*p)
{
p=(char *)malloc(6);
p="hello";
return;
}
main()
{
char *p="bye";
f(p);
printf("%s",p);
}
what is the o/p?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / yellareddy
After removing the error, the output is "bye"
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / subbu
after correction of error, the output will be hello
| Is This Answer Correct ? | 1 Yes | 2 No |
The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none
Function calling procedures? and their differences? Why should one go for Call by Reference?
write a program of bubble sort using pointer?
What is string function c?
what is the difference between normal variables and pointer variables..............
15 Answers HP, Infosys, Satyam, Vivekanand Education Society,
Which of the following sorts is quickest when sorting the following set: 1 2 3 5 4 1) Quick Sort 2) Bubble Sort 3) Merge Sort
Which is best book for data structures in c?
to get a line of text and count the number of vowels in it
How can I rethow can I return a sequence of random numbers which dont repeat at all?
What is difference between structure and union in c?
who did come first hen or agg
Write a program to print numbers from 1 to 100 without using loop in c?