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. What is true about fputs function

  • write to a file
  • takes two parameters
  • requires a file pointer
  • all of above

2. A member is a

  • Variable in a structure
  • Datatype of structure
  • Structure pointer
  • None of above

3. What is the purpose of getc()

  • read a character from STDIN
  • read a character from a file
  • read all file
  • read file random

4. What is prototype of a function in C

  • It is the return type of a function
  • It is the return data of the function
  • It is declaration of a function
  • It is a datatype

5. A variable in c

  • must have a valid datatype
  • can't have a name same as keyword
  • must have a name starting with a character
  • All of above
Read more from - C Programming Questions Answers - Chapter 1
Post a comment