Programming MCQS - QUESTION DETAILS

What is the purpose of the 'malloc' function in C?
A. Allocate memory for an array
B. Free allocated memory
C. Allocate memory for a variable
D. Allocate and initialize memory for an array

'malloc' is used to allocate memory for an array.

Similar Questions

How do you declare a constant integer in C?






How do you define a macro in C?






What is the output of printf("%d", 5 << 2);?






What is the purpose of the 'strtok' function in C?






How do you declare a structure in C?






How do you declare a two-dimensional array in C?






How do you use the 'const' keyword with a pointer in C?






Which header file is needed for file input and output operations in C?






What does the 'exit()' function do in C?






What is the purpose of the 'enum' keyword in C?