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
What is a stream in c programming?
What are c header files?
Explain how do you generate random numbers in c?
Explain argument and its types.
What is getch () for?
Are enumerations really portable?
What does the file stdio.h contain?
What are identifiers in c?
What are register variables? What are the advantage of using register variables?
What is a c token and types of c tokens?
can anyone suggest some site name..where i can get some good data structure puzzles???
What is #include conio h?
p*=(++q)++*--p when p=q=1 while(q<=6)
What is c++ used for today?
In which header file is the null macro defined?