download Mastguru Android App

Question Detail

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
Similar Questions :

1. Continue statement used for

  • To continue to the next line of code
  • To stop the current iteration and begin the next iteration from the beginning
  • To handle run time error
  • None of above

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

3. What is use of \r in c

  • used to insert a vertical tab
  • used to insert a tab
  • places cursor at the end of line
  • places cursor at the start of line

4. Disadvantage of array in C is

  • We can easily access each element
  • It is necessary to declare too many variables
  • It can store only one similar type of data
  • None of above

5. Structures can be used

  • to hold different datatypes
  • have pointers to structures
  • to assign to one another
  • all of above
Read more from - C Programming Questions Answers - Chapter 1
Post a comment