download Mastguru Android App

Question Detail

Difference between calloc() and malloc()

  • calloc() takes a single argument while malloc() needs two arguments
  • malloc() takes a single argument while calloc() needs two arguments
  • malloc() initializes the allocated memory to ZERO
  • calloc() initializes the allocated memory to NULL
Similar Questions :

1. The first expression in a for loop is

  • Step value of loop
  • Value of the counter variable
  • Any of above
  • None of above

2. Structures can be used

  • to hold different datatypes
  • have pointers to structures
  • to assign to one another
  • all of above

3. What is wild pointer in c

  • a pointer which we need to write in future
  • a pointer which has bad naming convention
  • a pointer which has no limit
  • a point which has not initialized

4. total number of keywords in C are

  • 30
  • 32
  • 48
  • 132

5. Difference between calloc() and malloc()

  • calloc() takes a single argument while malloc() needs two arguments
  • malloc() takes a single argument while calloc() needs two arguments
  • malloc() initializes the allocated memory to ZERO
  • calloc() initializes the allocated memory to NULL
Read more from - C Programming Questions Answers - Chapter 1
Post a comment