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 / madhureddy
the answer is bye
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is main () in c language?
What are pointers? What are different types of pointers?
What is && in c programming?
What does 4d mean in c?
What is difference between static and global variable in c?
in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none
What is identifiers in c with examples?
What are the functions to open and close the file in c language?
What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }
int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer
What should malloc(0) do?
How arrays can be passed to a user defined function
What is structure data type in c?
What is main () in c?
Do you have any idea about the use of "auto" keyword?