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
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.
What are all different types of pointers in c?
What does 4d mean in c?
What is the use of f in c?
Differentiate abs() function from fabs() function.
How would you obtain the current time and difference between two times?
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]
Write a program that accept anumber in words
How can I read in an object file and jump to locations in it?
What is the difference between declaring a variable by constant keyword and #define ing that variable?
What is difference between structure and union in c programming?
Why c is called a middle level language?
What does sizeof function do?
How do you construct an increment statement or decrement statement in C?
What is f'n in math?