what's the return value of malloc()

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we change the value of #define in c?

582


What are the different types of errors?

635


The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.

1626


What’s a signal? Explain what do I use signals for?

603


What is array in C

704






How to declare a variable?

564


What is operator promotion?

623


how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12

646


What is void pointers in c?

582


How many data structures are there in c?

612


How to get string length of given string in c?

602


What is break in c?

581


What is the use of extern in c?

639


How do you initialize pointer variables?

607


Is c procedural or functional?

582