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


Please Help Members By Posting Answers For Below Questions

Can you please compare array with pointer?

1056


please explain every phase in the "SDLC" in the dotnet.

2577


Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?

1099


What are the types of bitwise operator?

1075


What is the best style for code layout in c?

1077


What is #error and use of it?

1227


What is structure and union in c?

1096


Why do we use pointer to pointer in c?

1043


Write a Program to find whether the given number or string is palindrome.

1251


What’s a signal? Explain what do I use signals for?

1084


Are the outer parentheses in return statements really optional?

1082


How do I convert a string to all upper or lower case?

1077


Why is c so important?

1020


What are identifiers in c?

1172


What is a good way to implement complex numbers in c?

1025