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
- Data Science
- Android
- AJAX
- ASP.net
- C
- C++
- C#
- Cocoa
- Cloud Computing
- HTML5
- Java
- Javascript
- JSF
- JSP
- J2ME
- Java Beans
- EJB
- JDBC
- Linux
- Mac OS X
- iPhone
- MySQL
- Office 365
- Perl
- PHP
- Python
- Ruby
- VB.net
- Hibernate
- Struts
- SAP
- Trends
- Tech Reviews
- WebServices
- XML
- Certification
- Interview
categories
Related Tutorials
Java program to get location meta data from an image
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
Count number of vowels, consonants and digits in a String in Java
Student marks calculation program in Java
Calculate gross salary in Java
Calculate average sale of the week in Java
Vector in Java - Sample Program
Archived Comments
1. Gracias.
View Tutorial By: maiki at 2015-03-05 15:20:05
2. THANX :)
View Tutorial By: Saurabh at 2012-01-02 16:13:06
3. Fantastic work guys
View Tutorial By: wizard at 2012-09-22 04:18:59
4. its not sufficient add more details..
View Tutorial By: vikas at 2013-04-12 12:06:01
5. im jst a begnr of it
and i hope it wl hlp m
View Tutorial By: nitu at 2011-12-08 10:08:30
6. This should save some time
class pa
View Tutorial By: vamsi gude at 2012-03-20 18:27:24
7. I'm a begner but i dont know the way to ask quisti
View Tutorial By: sajid kahn at 2013-05-23 19:15:26
8. Nice guidelines which provide to understand struts
View Tutorial By: harshal patel at 2010-08-13 04:59:16
9. can client use prinwriter?????
View Tutorial By: sujay at 2009-02-20 00:23:33
10. Hi Gaurav, The sample in this tutorial is just a c
View Tutorial By: Ramlak at 2009-01-28 20:00:08