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

pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)

0 Answers   Huawei,


Why do we use return in c?

0 Answers  


Given a number N, product(N) is the product of the digits of N. We can then form a sequence N, product(N), product(product(N))… For example, using 99, we get the sequence 99, 99 = 81, 81 = 8. Input Format: A single integer N Output Format: A single integer which is the number of steps after which a single digit number occurs in the sequence. Sample Test Cases: Input #00: 99 Output #00: 2 Explanation: Step - 1 : 9 * 9 = 81 Step - 2 : 8 * 1 = 8 There are 2 steps to get to this single digit number. Input #01: 1137638147

2 Answers  


to get a line of text and count the number of vowels in it

2 Answers  


What is the difference between realloc() and free()

1 Answers  






explain how do you use macro?

0 Answers  


write a recursive program in'c'to find whether a given five digit number is a palindrome or not

2 Answers  


Why is %d used in c?

0 Answers  


How can I list all of the predefined identifiers?

0 Answers  


what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9

0 Answers  


write a program to display the numbers having digit 9 in the given range from 1 to 100

1 Answers  


write a program to print calender using for loop.

1 Answers   HCL, TCS,


Categories