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

Answers were Sorted based on User's Feedback



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

Answer / zan

segmentation fault

Is This Answer Correct ?    19 Yes 10 No

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

Answer / manoj

Nothing will happen. program will run fine.

Is This Answer Correct ?    6 Yes 3 No

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

Answer / karnik ankit

segmentation fault will be created

Is This Answer Correct ?    4 Yes 9 No

Post New Answer

More C Interview Questions

Write a function in c to find the area of a triangle whose length of three sides is given.

2 Answers  


What is #pragma statements?

0 Answers  


Design a program using an array that lists even numbers and odd numbers separately from the 12 numbers supplied by a user.

8 Answers  


for(i=1;i>0;i++); printf("i=%d",i); what will be the answer????

7 Answers  


what is the output of the following program? #include<stdio.h> void main() { int x=4,y=3,z; z=x-- -y; printf("\n%d %d %d",x,y,z); }

14 Answers  






what is the difference between call by value and call by reference?

5 Answers   Genpact, Global Logic, Infosys,


Given an array of length N containing integers between 1 and N, determine if it contains any duplicates.

3 Answers   SilverKey,


#include<stdio.h> #include<conio.h> void main() { int m=0111,n=20; printf("%d%d\n",m,n); getch(); }

1 Answers  


how to go with this?

1 Answers   Wipro,


Is it better to use a macro or a function?

0 Answers  


how to find out the union of two character arrays?

2 Answers  


Software Interview Questions

1 Answers   CAT,


Categories