f(char *p)
{
p=(char *)malloc(sizeof(6));
strcpy(p,"HELLO");
}
main()
{
char *p="BYE";
f(p)
printf("%s",p);
}
what is the output?

Answer Posted / hussain reddy

BYE

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of f in c?

551


How do you construct an increment statement or decrement statement in C?

733


Can you please explain the difference between exit() and _exit() function?

585


What is union and structure?

567


What is call by value in c?

550






cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration

628


Where we use clrscr in c?

693


What do you mean by dynamic memory allocation in c?

642


What are the salient features of c languages?

616


Can I initialize unions?

581


1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.

1655


What is auto keyword in c?

785


What are the types of type qualifiers in c?

642


How reliable are floating-point comparisons?

621


Explain how can I open a file so that other programs can update it at the same time?

586