Explain the concept of "dangling pointers" in C.



Explain the concept of "dangling pointers" in C...

Answer / nashiinformaticssolutions

A dangling pointer points to memory that has been deallocated. Accessing it causes undefined behavior.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array

0 Answers  


Explain why c is faster than c++?

0 Answers  


What are volatile variables?

1 Answers   Mind Tree,


You are given a string which contains some special characters. You also have set of special characters. You are given other string (call it as pattern string). Your job is to write a program to replace each special characters in given string by pattern string. You are not allowed to create new resulting string. You need to allocate some new memory to given existing string but constraint is you can only allocate memory one time. Allocate memory exactly what you need not more not less.

2 Answers   Microsoft,


What is operator promotion?

0 Answers  






how can i get the output 54321 4321 321 21 1 in c programming........???? pls help......

10 Answers   Infosys,


name the language for writing c compiler?

3 Answers   Microsoft,


who invented c

13 Answers   IBM,


A program to allow an input operand and operator from the operator and read on the display and output operand.

0 Answers  


2)#include<iostream.h> main() { printf("Hello World"); } the program prints Hello World without changing main() the o/p should be intialisation Hello World Desruct the changes should be a)iostream operator<<(iostream os, char*s) os<<'intialisation'<<(Hello World)<<Destruct b) c) d)none of the above

4 Answers   Siemens,


what do u mean by Direct access files? then can u explain about Direct Access Files?

0 Answers   LG Soft,


write the function int countchtr(char string[],int ch);which returns the number of timesthe character ch appears in the string. for example the call countchtr("she lives in Newyork",'e') would return 3.

6 Answers  


Categories