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. UML meaning is

  • Unique modeling language
  • Unified modeling language
  • Unified modern language
  • Unified master laqnguage

2. Out of following program :
float x = 10.7;
int i;

i = (int) x;
print i;

  • null
  • error
  • 10
  • garbage value

3. What will be the output of following program
#include
main()
{
int x,y = 10;
x = y * NULL;
printf(\"%d\",x);
}

  • error
  • 0
  • 10
  • Garbage value

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. Wild pointer in C

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