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
How can you avoid including a header more than once?
How can you find the day of the week given the date?
What are logical errors and how does it differ from syntax errors?
What is hashing in c language?
how to print the character with maximum occurence and print that number of occurence too in a string given ?
Difference between linking and loading?
a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion
Explain what is wrong with this program statement? Void = 10;
What are the Advantages of using macro
What are the types of bitwise operator?
hi, which software companys will take,if d candidate's % is jst 55%?
What is malloc return c?
What is the time and space complexities of merge sort and when is it preferred over quick sort?
Do you know the use of 'auto' keyword?
Write a program for Overriding.