Explain the concept of "dangling pointers" in C.
Answers were Sorted based on User's Feedback
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 |
Answer / glibwaresoftsolutions
A dangling pointer points to memory that has been deallocated. Accessing it causes undefined behavior.
Is This Answer Correct ? | 0 Yes | 0 No |
12. Look at the Code: main() { int a[]={1,2,3},i; for(i=0;i<3;i++) { printf("%d",*a); a++; } } Which Statement is/are True w.r.t the above code? I.Executes Successfully & Prints the contents of the array II.Gives the Error:Lvalue Required III.The address of the array should not be changed IV.None of the Above. A)Only I B)Only II C)II & III D)IV
Find Error if any in below code, Justify ur answer: struct xx { int a; struct yy { char c; struct xx* p; } struct yy* q; }
Does c have an equivalent to pascals with statement?
how to set Nth bit of a variable?
from which concept of 'c', the static member function of 'c++' has came?
What is substring in c?
how to implement stack work as a queue?
How can I make it pause before closing the program output window?
What is union and structure?
What is meaning of tree
What is the translation phases used in c language?
Describe advantages and disadvantages of the various stock sorting algorithms