ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
what's the return value of malloc()
 Question Submitted By :: Aruncit
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what's the return value of malloc()
Answer
# 1
If there is memory avaliablity in the system.. 
Then fisrt address of the memory allocated in returned. 
Else NULL/Garbage value is returned.
 
Is This Answer Correct ?    6 Yes 0 No
Vrushali
 
  Re: what's the return value of malloc()
Answer
# 2
garbage
but calloc returns zero
 
Is This Answer Correct ?    1 Yes 4 No
Himanshu
 
 
 
  Re: what's the return value of malloc()
Answer
# 3
malloc() returns pointer to void. That is, pointer to the
first memory location of the allocated memory block. The
pointer type is unknown at this point, hence typecasting is
done later.
 
Is This Answer Correct ?    7 Yes 0 No
Ravi A Joshi
 
  Re: what's the return value of malloc()
Answer
# 4
malloc returns a pointer to the allocated space if required
memory is found, else, a null pointer is returned and
'errno' is set to indicate the error.
 
Is This Answer Correct ?    2 Yes 0 No
Shashidhar Murthy
 
  Re: what's the return value of malloc()
Answer
# 5
malloc returns a pointer to the allocated space if required 
memory is available otherwise it will return a null pointer.
 
Is This Answer Correct ?    0 Yes 0 No
Sourisengupta
 
  Re: what's the return value of malloc()
Answer
# 6
malloc is a pointer  it is used to allocate memory
 
Is This Answer Correct ?    0 Yes 0 No
Tamil
 
  Re: what's the return value of malloc()
Answer
# 7
void
 
Is This Answer Correct ?    0 Yes 2 No
Ruchi
 
  Re: what's the return value of malloc()
Answer
# 8
malloc returns void pointer to allocated memory location.
it is also called generic pointer
 
Is This Answer Correct ?    1 Yes 0 No
Monu Verma
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
disadvantages of realloc ? HCL1
main() { clrscr(); } clrscr(); ME3
Write a program for deleting duplicate elements in an array Subex3
how to convert binary to decimal and decimal to binary in C lanaguage  4
How can I get Single byte from 'int' type variable? Can we alter single bit or multiple bits in int type variable? if so, How?  2
a number is perfect if it is equal to the sum of its proper divisor.. 6 is perfect number coz its proper divisors are 1,2 and three.. and 1+2+3=6... a number is deficient if the sum of its proper divisor is less than the number.. sample: 8 is deficient, coz its proper divisors are 1,2 and 4, and 1+2+4=7. abundant number, if the sum of its proper divisor is greater than the number.. sample..12 is abundant coz 1+2+3+4+6=16 which is geater than 12. now write a program that prompts the user for a number, then determines whether the number is perfect,deficient and abundant..  1
Who had beaten up hooligan "CHAKULI" in his early college days?  1
what are the uses of structure? HCL5
program to find the ASCII value of a number  5
There are 3 baskets of fruits with worng lables,one basket has apple,another basket has orange,another has combination of apple and orange,what is the least way of interchange the lables. Google10
what is pointer ? Kernex-Micro-Systems7
related to rdbms query .  1
How can we see the Expanded source code and compiled code for our source program in C?  1
WHAT IS THE DIFFERANCE BITWIN GETS();AND SCANF();  2
How would you sort a linked list?  1
what is difference between array of characters and string Accenture10
without using arithmatic operator solve which number is greater??????????  1
implement general tree using link list Wipro1
what is c? Tech-Mahindra5
i want the code for printing the output as follows 4 4 3 3 2 2 1 1 0 1 1 2 2 3 3 4 4  1
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com