what will happen if you free a pointer twice after
allocating memory dynamically ?

Answer Posted / manoj

Nothing will happen. program will run fine.

Is This Answer Correct ?    6 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is better malloc or calloc?

653


What are local static variables? How can you use them?

647


What is c variable?

553


What is a substring in c?

588


What are the string functions? List some string functions available in c.

605






How do you list files in a directory?

563


What is memory leak in c?

637


What does c mean before a date?

592


What are dangling pointers? How are dangling pointers different from memory leaks?

623


How many types of sorting are there in c?

614


The statement, int(*x[]) () what does in indicate?

647


Explain indirection?

648


What is the usage of the pointer in c?

606


How do you determine the length of a string value that was stored in a variable?

652


Why do we use int main instead of void main in c?

622