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

In C, What is the #line used for?

2210


Lists the benefits of c programming language?

1138


What is the right type to use for boolean values in c? Is there a standard type?

1015


what are # pragma staments?

2046


Explain two-dimensional array.

1074


Why clrscr is used in c?

1014


What is graph in c?

1056


How are variables declared in c?

1103


Can we declare function inside main?

1001


Write a program to reverse a string.

1078


What is getche() function?

1044


int far *near * p; means

3558


code for find determinent of amatrix

1966


how to create duplicate link list using C???

2559


Where can I get an ansi-compatible lint?

1150