what's the return value of malloc()
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
Answer / tamil
malloc is a pointer it is used to allocate memory
Is This Answer Correct ? | 0 Yes | 0 No |
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 |
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 |
Program to simulate second clock
What is meaning of tree
What is use of integral promotions in c?
Describe newline escape sequence with a sample program?
Define VARIABLE?
What do you mean by team??
Can we change the value of constant variable in c?
An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above
Why clrscr is used in c?
find second largest element in array w/o using sorting techniques? use onle one for loop.
15 Answers BitWise, Zycus Infotech,
Write a program to give following output..... ********* **** **** *** *** ** ** * * ** ** *** *** **** **** *********
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..