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. A member is a

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

2. The compiler in C ignores all text till the end of line using

  • //
  • /
  • */
  • none of above

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

4. Which operator has the highest priority

  • ()
  • []
  • *
  • /

5. 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
Read more from - C Programming Questions Answers - Chapter 1