Comment on Tutorial - Using free() Function in C By Daniel Malcolm



Comment Added by : Neo

Comment Added at : 2012-04-04 16:21:35

Comment on Tutorial : Using free() Function in C By Daniel Malcolm
Can you tell me what will happen when I use a free function call to release the memory allocated to a memory block on ONE of the MULTIPLE pointers pointing to that memory block, eg

void *ptr1,*ptr2,*ptr3;
ptr1=ptr2=ptr3=malloc(1000);
free(ptr1);

in this case, what will happen if I try to access ptr2 and ptr3, and for that matter, ptr1, before I have assigned NULL to them, and after the above code?


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. hai vij i am also having error what sol u used to
View Tutorial          By: uma at 2008-05-30 01:05:39

2. Thnx A Lot...very healpful...........
View Tutorial          By: vinay at 2012-07-19 09:21:20

3. Very good tutorial!
View Tutorial          By: Herve at 2011-04-04 08:06:21

4. I am wanting to use a Honeywell 4600g handheld sca
View Tutorial          By: bugdrvr1970 at 2012-01-25 17:27:43

5. Excellent!!!!!!!!!!!!
View Tutorial          By: Ramana at 2009-01-02 19:31:58

6. How can i use this code to send multiple sms using
View Tutorial          By: Shoaib at 2014-03-07 19:49:11

7. import java.lang.*;
import java.io.*;

View Tutorial          By: satya at 2012-12-09 10:57:28

8. very nice content
View Tutorial          By: sarat at 2012-08-22 12:17:26

9. Thanks
View Tutorial          By: Bad Programmer at 2011-11-23 10:43:49

10. Thanks!
Please point me to a site which di

View Tutorial          By: TERRY DEGLOW at 2012-01-29 16:04:41