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
In C, What is the #line used for?
Lists the benefits of c programming language?
What is the right type to use for boolean values in c? Is there a standard type?
what are # pragma staments?
Explain two-dimensional array.
Why clrscr is used in c?
What is graph in c?
How are variables declared in c?
Can we declare function inside main?
Write a program to reverse a string.
What is getche() function?
int far *near * p; means
code for find determinent of amatrix
how to create duplicate link list using C???
Where can I get an ansi-compatible lint?