Home C C++ Java Python Perl PHP SQL JavaScript Linux Selenium QT Online Test

Home » C++ » malloc() & free() in C programming

Interview Questions and Answers on malloc() & free() in C : (10)


Question: 1

(A) Allocated memory has undefined value
(B) It returns pointer to the allocated space
(C) Pointer is NULL if memory is not allcoated
(D) It doesn't lead to memory leak if memory is not de allocated

Compiler
Level: Beginner Category of MCQ: malloc_free



Question: 2

(A) True
(B) False

Compiler
Level: Beginner Category of MCQ: malloc_free



Question: 3

(A) 999
(B) 10
(C) 0
(D) Segmentation fault

Compiler
Level: Expert Category of MCQ: malloc_free



Question: 4

(A) NULL
(B) cppbuzz
(C) Nothing is printed
(D) Typecasting Error

Compiler
Level: Expert Category of MCQ: malloc_free



Question: 5

(A) Program runs smoothly
(B) Compilation Error
(C) Runtime Error- Program crashes

Compiler
Level: Expert Category of MCQ: malloc_free



Question: 6

(A) True
(B) False

Compiler
Level: Practionar Category of MCQ: malloc_free



Question: 7

(A) Program runs smoothly & nothing is printed
(B) Runtime Error : Crash
(C) Compilation Error
(D) None of these

Compiler
Level: Practionar Category of MCQ: malloc_free



Question: 8

(A) Program runs smoothly
(B) Compilation Error
(C) Program runs smoothly but has memory leak
(D) Runtime Error : Crash

Compiler
Level: Practionar Category of MCQ: malloc_free



Question: 9

(A) Compilation Error
(B) Runtime Error: Crash
(C) Program runs smoothly but has memory leak
(D) Program runs smoothly & nothing is printed

Compiler
Level: Practionar Category of MCQ: malloc_free



Question: 10

(A) _ptr is NULL 0x21f3010 @
(B) _ptr not NULL 0x21f3010 @
(C) Runtime Error: Segmentation Fault
(D) _ptr not NULL 0x21f3010

Compiler
Level: Expert Category of MCQ: malloc_free



Browse By Categories