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 the purpose of main( ) in c language?
What is a macro, and explain how do you use it?
Explain union. What are its advantages?
Explain built-in function?
Explain how can I open a file so that other programs can update it at the same time?
Explain the difference between getch() and getche() in c?
What is #pragma statements?
What is an lvalue?
program for reversing a selected line word by word when multiple lines are given without using strrev
How reliable are floating-point comparisons?
How many main () function we can have in a project?
What does == mean in texting?
Why are all header files not declared in every c program?
Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?