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

How can you avoid including a header more than once?

986


How can you find the day of the week given the date?

1204


What are logical errors and how does it differ from syntax errors?

1302


What is hashing in c language?

1315


how to print the character with maximum occurence and print that number of occurence too in a string given ?

2474


Difference between linking and loading?

1112


a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion

2780


Explain what is wrong with this program statement? Void = 10;

1265


What are the Advantages of using macro

1177


What are the types of bitwise operator?

1113


hi, which software companys will take,if d candidate's % is jst 55%?

2093


What is malloc return c?

1028


What is the time and space complexities of merge sort and when is it preferred over quick sort?

1083


Do you know the use of 'auto' keyword?

1200


Write a program for Overriding.

1160