Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

difference between malloc and calloc

Answer Posted / vara

There are two differences.
1) is the number of arguments. Malloc() takes a single
argument (memory required in bytes), while calloc() needs
two arguments (number of variables to allocate memory, size
in bytes of a single variable).
2)malloc() does not initialize the memory allocated, while
calloc() initializes the allocated memory to ZERO.

Is This Answer Correct ?    15 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

in any language the sound structure of that language depends on its a) character set, input/output function, its control structures b) character set, library functions, input/output functions its control structures c) character set, library functions, control sturctures d) character set, operators, its control structures

1208


Can the sizeof operator be used to tell the size of an array passed to a function?

1118


What are linked lists in c?

1132


formula to convert 2500mmh2o into m3/hr

1000


On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area

1125


Why can’t we compare structures?

1277


praagnovation

2290


In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)

2127


Why is c so popular?

1165


What is the use of f in c?

984


What are pointers in C? Give an example where to illustrate their significance.

1231


What are predefined functions in c?

1102


Explain the use of #pragma exit?

1181


Explain function?

1095


Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1

4281