Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What is the advantage of using #define to declare a constant?

1037


What is the ANSI C Standard?

1212


What are the various types of control structures in programming?

1007


How is a macro different from a function?

1118


What are the scope of static variables?

1117


Explain how do you print an address?

1087


What are the difference between a free-standing and a hosted environment?

1221


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.

2105


Is main an identifier in c?

1087


Why header files are used?

1064


What is the size of array float a(10)?

1092


What does the format %10.2 mean when included in a printf statement?

1588


Is c still relevant?

1035


What is static identifier?

1166


Explain the difference between structs and unions in c?

959