IndiaBIX.com
Arithmetic Aptitude Data Interpretation
Logical Reasoning Verbal Reasoning Non Verbal Reasoning
General Knowledge
Sudoku Number puzzles Missing letters puzzles Logical puzzles Playing cards puzzles Clock puzzles
C Programming C# Programming Java Programming
Networking Database Questions Computer Science Basic Electronics Digital Electronics Electronic Devices Circuit Simulation Electrical Enigneering Engineering Mechanics Technical Drawing
Placement Papers Group Disucssion HR Interview Technical Interview Body Language
Aptitude Test Verbal Ability Test Verbal Reasoning Test Logical Reasoning Test C Programming Test Java Programming Test Data Interpretation Test General Knowledge Test
Data Structures Operating Systems Networking DATABASE Database Basics SQL Server Basics SQL Server Advanced SQL Server 2008 JAVA Core Java Java Basics Advanced Java UNIX Unix File Management Unix Memory Management Unix Process Managemnt C Interview Questions The C Language Basics .NET Interview Questions .NET Framework ADO.NET ASP.NET Software Testing

C Programming - Memory Allocation - Discussion

@ : Home > C Programming > Memory Allocation > General Questions - Discussion

Read more:

"Two things are infinite: the universe and human stupidity; and I'm not sure about the universe."
- Albert Einstein
3. 

How will you free the memory allocated by the following program?

#include<stdio.h>
#include<stdlib.h>
#define MAXROW 3
#define MAXCOL 4

int main()
{
    int **p, i, j;
    p = (int **) malloc(MAXROW * sizeof(int*));
    return 0;
}

[A]. memfree(int p);[B]. dealloc(p);
[C]. malloc(p, 0);[D]. free(p);

Answer: Option C

Explanation:

No answer description available for this question.


Sai Ram said: (Thu, Sep 16, 2010 05:35:12 AM)    
 
Any allocation functions like alloc () , malloc () and calloc () should release their memory space with free () function only.

Seema said: (Tue, Apr 5, 2011 05:57:38 AM)    
 
It is a obvious answere because memory is freed by free() function. Which is option D.

Muruganandam said: (Mon, Jul 18, 2011 10:43:56 AM)    
 
free() function is used for to free the memory space.

Ashok said: (Sat, Jul 30, 2011 12:16:16 AM)    
 
Yes I agree with seema & ram by free() memory is from allocation.

Write your comments here:
Name *:     Email:


© 2008-2011 by IndiaBIX™ Technologies. All Rights Reserved | Copyright | Terms of Use & Privacy Policy

Advertise     Contact us: info@indiabix.com     Follow us on twitter!