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

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

2. If (*p) and **p is same

  • No
  • Yes

3. rand() function returns

  • float value
  • integer value
  • any type
  • none of above

4. What will be output of
#include
void main()
{
char test =`S`;
printf("\n%c",test);
}

  • S
  • Error
  • Garbage value
  • None of above

5. What is dangling pointer in c

  • if pointer is pointing to a memory location from where variable has been deleted
  • if pointer is assigned to more than one variable
  • if pointer is not defined properly
  • none of above
Read more from - C Programming Questions Answers - Chapter 1
Post a comment

  • anand 11 years ago

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