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

main()
{
char *p1="Name";
char *p2;
p2=(char *)malloc(20);
while(*p2++=*p1++);
printf("%s\n",p2);
}

Answer Posted / vignesh1988i

actually in this problem, the p2 will take characters after '\0' too from p1 upto the size of p2 come to an end.

so it prints
output :

Name #^$&dhd


thank u

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is c known as a mother language?

1187


What is the auto keyword good for?

1064


How can I make it pause before closing the program output window?

990


Is flag a keyword in c?

1109


What is printf () in c?

1013


Explain what are the different data types in c?

1160


Is c easier than java?

999


What is sizeof return in c?

983


What is a volatile keyword in c?

1112


What is #define used for in c?

1015


Give differences between - new and malloc() , delete and free() ?

1045


List the variables are used for writing doubly linked list program.

1967


What is the difference between far and near ?

1156


Explain the use of 'auto' keyword

1073


Subtract Two Number Without Using Subtraction Operator

781