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 are c identifiers?

1151


What are the types of bitwise operator?

1168


What is dangling pointer in c?

1335


What is a pointer variable in c language?

1156


Explain what is page thrashing?

1161


Why & is used in scanf in c?

1147


simple program of graphics and their output display

2052


How do you list files in a directory?

1213


Explain what is the difference between far and near ?

1166


What does sizeof function do?

1257


What are the valid places to have keyword “break”?

1147


can any one provide me the notes of data structure for ignou cs-62 paper

2232


How to set file pointer to beginning c?

1249


What is the difference between variable declaration and variable definition in c?

1105


Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?

1214