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);
}
what is the output?



Answer Posted / ali fakoor

A part of uninitialized (and/or unowned) memory after (and
including) the sixth byte of the malloc-ed memory will be
printed out until reaching a NULL character in the memory
somewhere!

Is This Answer Correct ?    6 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a stream in c programming?

1147


What are c header files?

990


Explain how do you generate random numbers in c?

1084


Explain argument and its types.

1061


What is getch () for?

1231


Are enumerations really portable?

1025


What does the file stdio.h contain?

1056


What are identifiers in c?

1199


What are register variables? What are the advantage of using register variables?

1189


What is a c token and types of c tokens?

1057


can anyone suggest some site name..where i can get some good data structure puzzles???

2082


What is #include conio h?

996


p*=(++q)++*--p when p=q=1 while(q<=6)

1758


What is c++ used for today?

1108


In which header file is the null macro defined?

1341