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 / prasad

it prints BYE on screen!!!

Is This Answer Correct ?    15 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where are some collections of useful code fragments and examples?

701


Explain what is the difference between functions abs() and fabs()?

608


which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above

1401


What is the correct declaration of main?

663


C language questions for civil engineering

1231






‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .

2357


How many bytes are occupied by near, far and huge pointers (dos)?

653


Is swift based on c?

622


What is a const pointer in c?

656


what type of questions arrive in interview over c programming?

1539


What is a const pointer?

617


Explain what is meant by 'bit masking'?

634


What is the c language function prototype?

631


Can you return null in c?

584


What is hashing in c language?

595