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

Is register a keyword in c?

812


What is the difference between call by value and call by reference in c?

866


write a program to print data of 5 five students with structures?

1815


What is wrong with this declaration?

817


Explain the properties of union.

805






What is wrong with this program statement? void = 10;

1001


What is the acronym for ansi?

793


HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????

2438


Differentiate between #include<...> and #include '...'

793


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

4960


How do I copy files?

792


What is c++ used for today?

849


how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?

1704


What is the difference between null pointer and wild pointer?

888


What is calloc malloc realloc in c?

790