what's the return value of malloc()

Answer Posted / himanshu

garbage
but calloc returns zero

Is This Answer Correct ?    4 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I call a function with an argument list built up at run time?

640


What is a keyword?

747


How many types of functions are there in c?

585


Explain setjmp()?

659


What are the similarities between c and c++?

600






#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }

631


What are integer variable, floating-point variable and character variable?

609


What are the general description for loop statement and available loop types in c?

688


why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???

1519


What is the size of enum in bytes?

589


write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3

1644


How do you do dynamic memory allocation in C applications?

630


Why do we use null pointer?

607


Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?

580


What is a sequential access file?

648