download Mastguru Android App

Question Detail

Due to variable scope in c

  • Variables created in a function cannot be used another function
  • Variables created in a function can be used in another function
  • Variables created in a function can only be used in the main function
  • None of above
Similar Questions :

1. 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

2. What is the purpose of getc()

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

3. Adding to a pointer that points to an array will

  • Cause an error
  • Increase the value of the element that the pointer is pointing to
  • Cause the pointer to point to the next element in the array
  • None of above

4. Break statement is used for

  • Quit a program
  • Quit the current iteration
  • Both of above
  • None of above

5. printf() belongs to which library of c

  • stdlib.h
  • stdio.h
  • stdout.h
  • stdoutput.h
Read more from - C Programming Questions Answers - Chapter 1
Post a comment

  • anand 6 years ago

    can you give example for variable scope in c. que no 6.