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
What is the use of f in c?
How do you construct an increment statement or decrement statement in C?
Can you please explain the difference between exit() and _exit() function?
What is union and structure?
What is call by value in c?
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
Where we use clrscr in c?
What do you mean by dynamic memory allocation in c?
What are the salient features of c languages?
Can I initialize unions?
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.
What is auto keyword in c?
What are the types of type qualifiers in c?
How reliable are floating-point comparisons?
Explain how can I open a file so that other programs can update it at the same time?