what's the return value of malloc()

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is call by reference in functions?

560


A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream

664


What is the use of a ‘’ character?

582


general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only

584


Difference between Function to pointer and pointer to function

625






What is c definition?

737


what is the role you expect in software industry?

1649


Are negative numbers true in c?

595


What are multidimensional arrays?

656


using for loop sum 2 number of any 4 digit number in c language

1731


Tell me the use of bit field in c language?

626


Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.

1011


What is c language in simple words?

588


What is a node in c?

543


Write a program to swap two numbers without using a temporary variable?

603