What are dangling pointers? How are dangling pointers different from memory leaks?
So dangling pointer is nothing but a pointer which is pointing a dynamic variable whose scope is already finished. Memory leak: When there is a memory area in a heap but no variable in the stack pointing to that memory.
Is This Answer Correct ? | 0 Yes | 0 No |
What is structure data type in c?
how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?
Explain the difference between ++u and u++?
What is string function in c?
Why header files are used?
Explain how do you declare an array that will hold more than 64kb of data?
if the address of a[1,1] and a[2,1] are 1000 and 1010 respectively and each occupies 2 bytes then the array has been stored in what order?
4 Answers Amazon, Apple, Bata, Google, NASA,
how to capitalise first letter of each word in a given string?
main() {char a[10]={1,2,3,4,5,6};int x; for(x=0;x<4;x++){ b[x]=x+'a';} printf("%s",b);}
simple program of graphics and thier outpu display with a want what is out put of graohics in c language
what is a NULL Pointer? Whether it is same as an uninitialized pointer?
find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }