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

1. 

Which header file should be included to use functions like malloc() and calloc()?

[A]. memory.h[B]. stdlib.h
[C]. string.h[D]. dos.h

Answer: Option B

Explanation:

No answer description available for this question.


Janardan said: (Mon, Oct 4, 2010 02:16:47 PM)    
 
The malloc() and calloc() are two library fuctions to allocate memory in language c. To allocate a block of memory, call malloc & calloc. The prototype for this function is in 'stdlib.h'.

Wahid Sayed said: (Wed, Oct 20, 2010 12:55:00 PM)    
 
Then when do we use memory.h ?

Likita Shetty said: (Fri, Jan 7, 2011 09:10:12 AM)    
 
I thought its just "alloc.h" .. i remember my program working by using just alloc.h

Mahesh said: (Fri, Jan 21, 2011 12:39:36 PM)    
 
The header file will be alloc.h but it is not in the option.

Sundar said: (Fri, Jan 21, 2011 11:27:46 PM)    
 
We can include any of the following header files

1. stdlib.h
2. alloc.h

Since alloc.h is not provided in any option. Therefore stdlib.h is the correct answer.

Hope this help you. Have a nice day!

Ruthran said: (Tue, Mar 1, 2011 05:37:06 AM)    
 
stdlib.h header file only have prototype of malloc() and clloc()

Anubhav Singh said: (Sun, Jun 19, 2011 12:59:50 AM)    
 
we know that stdlib is standard library which include mostly all segments of header files it is like an package, which contains these like alloc.h, malloc.h etc.

Gudevenkatrao said: (Sat, Jul 30, 2011 08:16:01 PM)    
 
What is the syntax of malloc() ?

Latha said: (Wed, Aug 24, 2011 09:38:20 PM)    
 
Give difference of malloc & calloc ?

Kunjal said: (Fri, Sep 30, 2011 06:33:00 PM)    
 
Both allocate storage memory but the difference is malloc process single argument so just specify storage space while calloc process double argument so specify no. Of variable and space needed for that variable.

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!