Programming Language MCQ IT Officer(PSC)
MCQs from PAGE1 1. ______ is a condition in which the memory is dynamically reserved but isn't accessible to any program. a) Pointer Leak b) Frozen Memory c) Dangling Pointer d) Memory Leak Correct Answer: d Explanation: A memory leak occurs when dynamically allocated memory is not freed and becomes inaccessible to the program, leading to resource wastage. A dangling pointer refers to a pointer that points to deallocated memory, and a pointer leak is not a standard term. The correct answer is "d". 2. Which of these is NOT a relational or logical operator? a. = b. || c. = d. != Correct Answer: c Explanation: The options include relational operators ( = , != ) and logical operators ( || for OR). However, = is likely a typo and intended as == (equality operator). Assuming the question intends to identify an invalid operator, = (assignment) is not a relational or logical operator, unlike == (comparison). The answer sheet lists "a," but given...