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

write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.

3976


What are all different types of pointers in c?

1012


What does 4d mean in c?

1505


What is the use of f in c?

984


Differentiate abs() function from fabs() function.

1022


How would you obtain the current time and difference between two times?

1295


Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]

1090


Write a program that accept anumber in words

1762


How can I read in an object file and jump to locations in it?

1034


What is the difference between declaring a variable by constant keyword and #define ing that variable?

3379


What is difference between structure and union in c programming?

1112


Why c is called a middle level language?

1115


What does sizeof function do?

1202


How do you construct an increment statement or decrement statement in C?

1238


What is f'n in math?

1072