What is the explanation for the dangling pointer in c?
Answer / Bharti Nayak
"A dangling pointer in C occurs when a pointer points to memory that has been deallocated or freed. This can lead to undefined behavior, such as accessing memory that does not belong to your program. It happens often when you free() an allocated memory and then try to use the pointer again."
| Is This Answer Correct ? | 0 Yes | 0 No |
what is the output of the program?? #include<stdio.h> main ( ) { int a=010,sum=0,tracker: for(tracker=0;tracker<=a;tracker++) sum+=tracker; printf(ā %d\nā,sum); } what is the difference between a=10 and a=010??
how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?
WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER
What is a static function in c?
What is scanf_s in c?
read a number & print all its devisors using c-program?
Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop
What's a good way to check for "close enough" floating-point equality?
what do u mean by Direct access files? then can u explain about Direct Access Files?
void main() { static int i = 5; if(--i) { main(); printf("%d ",i); } } what would be output of the above program and justify your answer? }
5 Answers C DAC, CDAC, Infosys, Wipro,
1)what is the error in the following stmt where str is a char array and the stmt is supposed to traverse through the whole character string str? for(i=0;str[i];i++) a)There is no error. b)There shud be no ; after the stmt. c)The cond shud be str[i]!='\0' d)The cond shud be str[i]!=NULL e)i shud be initialized to 1
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?