UNIT – 11
MEMORY ALLOCATION
1) _____ allocation provides a way to dynamically create buffers and arrays.
a)*Memory b)array c)pointer d) None
2) _______ means that the space is allocated in memory as the program is executing .a)Static b)*Dynamic c)Allocation d) None
3) ________ function required the number of bytes to allocate dynamically.
a)*malloc() b)realloc() c)calloc() d)None
4) malloc() function return a ______ , if the memory allocation was successful.
a)NULL b)EOF c)*void pointer d) None
5) malloc() function return a ______ , if the memory allocation was failure.
a)*NULL b)EOF c)void pointer d) None
6) _______ function returns the size in bytes of an object.
a)count() b)*sizeof() c)printf() d)None
7) Allocate the memory dynamically using _ function and store a certain number of bytes.
a)*malloc() b)realloc() c)calloc() d)None
8) ______ function is used to release the used memory.
a)*free() b)delete() c)remove() d) None
9) __ function is used to store the values in the allocated memory space is zero by default.
a)malloc() b)realloc() c)*calloc() d)None
10) calloc() function return ______ if the memory allocation was successful .
a)null b)EOF c)*void pointer d) None
11) _______ function is used to modify the allocated memory.
a)alloc() b)malloc() c)*realloc() d)None
12) realloc() function returns ______ if succssful.
a)null b)EOF c)*void pointer d)None
13) realloc() function returns ______ if not successful.
a)*NULL b)EOF c)void pointer d)None
14) If memory allocation failed , then malloc() will return a _____ pointer.
a)*NULL b)EOF c)void pointer d) None
15) Calloc() function required _____ number of arguments.
a) 1 b)*2 c)3 d)None
UNIT – 11
MEMORY ALLOCATION
1 A 2 B 3 A 4 C 5 A
6 B 7 A 8 A 9 C 10 C
11 C 12 C 13 A 14 A 15 B