Mid Exam 2024
Mid Exam 2024
& 30 Mins
Course offered to: Pre-engineering students Date: June 6, 2024
Mid-exam
Part I: Write True if the statement is correct and False if the statement is incorrect. (1.5 pt
each=6pts).
1. In nested if else, if a condition is false, the statement associated will not be executed and it
terminates the whole if-else chain
2. Break statement terminates the execution of the running program even if the current iteration of a
loop has not been completed.
3. The statements in a do-loop are executed at least one time even if the condition is false.
4. In C++ programming language, the default case in a switch is always used as the end case.
Part II: Choose the best answer among the given alternatives (1.5 pt each=12pts)
A) Compiler
B) Interpreter
C) Assembler
D) All
1. Write the pseudo code and draw a flowchart for a program that will produce the sum of the following
sequence.
2 + 5 + 8 + 11. . . + 50
2. Write a program that accepts a character entered from the keyboard and tells whether it is a digit or a
letter or a special symbol.
3. Write a program that accepts a list of marks of students and counts the number of students who have
scored marks less than 25 in an exam out of 50. The total number of students who took the test is to
be entered from the keyboard.