Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what's the return value of malloc()

Answers were Sorted based on User's Feedback



what's the return value of malloc()..

Answer / vrushali

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 ?    22 Yes 2 No

what's the return value of malloc()..

Answer / ravi a joshi

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 ?    17 Yes 1 No

what's the return value of malloc()..

Answer / monu verma

malloc returns void pointer to allocated memory location.
it is also called generic pointer

Is This Answer Correct ?    6 Yes 0 No

what's the return value of malloc()..

Answer / shashidhar murthy

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 ?    5 Yes 0 No

what's the return value of malloc()..

Answer / tamil

malloc is a pointer it is used to allocate memory

Is This Answer Correct ?    0 Yes 0 No

what's the return value of malloc()..

Answer / ashish

Upon successful completion with size not equal to 0, malloc() shall return a pointer to the allocated space. If size is 0, either a null pointer or a unique pointer that can be successfully passed to free() shall be returned. Otherwise, it shall return a null pointer [CX] and set errno to indicate the error

Is This Answer Correct ?    0 Yes 0 No

what's the return value of malloc()..

Answer / sourisengupta

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 1 No

what's the return value of malloc()..

Answer / himanshu

garbage
but calloc returns zero

Is This Answer Correct ?    4 Yes 7 No

what's the return value of malloc()..

Answer / ruchi

void

Is This Answer Correct ?    0 Yes 4 No

Post New Answer

More C Interview Questions

AMMONG THE 4 STROAGE CLASSES IN C, WHICH ONE FASTEST?

13 Answers   HCL,


find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }

0 Answers   Microsoft,


Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates

3 Answers  


What is multidimensional arrays

0 Answers  


what is the difference between NULL('\0') and 0?

14 Answers   Microsoft,


illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

0 Answers  


What does d mean?

0 Answers  


List some of the dynamic data structures in C?

0 Answers  


What is the proper way of these job Tell me about there full work

0 Answers   EDS,


in C-programming language without using printf statement can we get output r not ? if yes how and if no also how ?

11 Answers   IBM,


What is declaration and definition in c?

0 Answers  


Explain b+ tree?

0 Answers  


Categories