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 iso what are the common technological language?
Why we use void main in c?
What is the deal on sprintf_s return value?
What is the general form of #line preprocessor?
In a switch statement, explain what will happen if a break statement is omitted?
a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list
main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }
What is a example of a variable?
Explain function?
Write a program to swap two numbers without using the third variable?
Write a code to generate divisors of an integer?
What is a good way to implement complex numbers in c?
How to write a multi-statement macro?
Explain how can I avoid the abort, retry, fail messages?
What is getch c?