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 programming, what command or code can be used to determine if a number of odd or even?
Difference between pass by reference and pass by value?
Explain bitwise shift operators?
What is the use of bitwise operator?
What is a structure member in c?
how can I convert a string to a number?
Difference between macros and inline functions? Can a function be forced as inline?
‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .
Why do we use return in c?
Differentiate between functions getch() and getche().
Write a program to reverse a linked list in c.
Explain what is the difference between a free-standing and a hosted environment?
write a program to copy the string using switch case?
Is c is a high level language?
Where does the name "C" come from, anyway?