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. Break statement is used for

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

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

3. printf() belongs to which library of c

  • stdlib.h
  • stdio.h
  • stdout.h
  • stdoutput.h

4. Which is invalid name of identifier

  • world
  • addition23
  • test_name
  • factorial

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

  • S
  • Error
  • Garbage value
  • None of above
Read more from - C Programming Questions Answers - Chapter 1