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 / deepa
SOORY FOR POSTIN THE WRONG ANSWER THE ANSER WUD BE BYE COZ
THE *P DIES IN THE FUNCTION ITSELF AS WE ARE NOT RETURNING
THE STRING BACK IN THE MAIN PROGRAM
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
What are shell structures used for?
difference between object file and executable file
What is wrong in this statement?
what is the height of tree if leaf node is at level 3. please explain
How can I read/write structures from/to data files?
a c code by using memory allocation for add ,multiply of sprase matrixes
Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record
hi any body pls give me company name interview conduct "c" language only
How reliable are floating-point comparisons?
What is pointer to pointer in c?
What is the difference between āgā and āgā in C?
Explain what is the most efficient way to store flag values?
What are near, far and huge pointers?
What are extern variables in c?
Can you please explain the difference between exit() and _exit() function?