You are on page 1of 4

Mansoura National University Int.

to Computer Systems
Faculty of Engineering Module Code: (CSE 042)
AIE, MTE, BME, CCE Time allowed :45 Minutes
Level : Freshman (000) Full Mark:20 Marks
(4 pages exam) Module Credit Hours (3)
Midterm Exam (Model 1) (3-4-2024) – Spring Semester
Name: ID: Program:

Part 1: Questions 1 to 14 (7 Marks)

1. The parallelogram symbol in the 7. One of the steps of the program


flowchart drawing represents ……….. execution is ……………
a) Decision b) Process a) Compiler b) Run
c) Input/Output d) Start c) For-Loop d) Debugger
2. Which of the following is not a valid 8. …………… is a type of error due to miss
variable name declaration? writing in the language code.
a) int _a3; b) int a_3; a) Linker b) Syntax
c) int 3_a; d) int _3a; c) Run-time d) Logical
3. int a=10 + 2 * 12 % (3 * 2) + 15; 9. …………… is a type of error due to miss
understand the program function.
a) a=31 b) a=19 c) a=25 d) a=29
a) Linker b) Syntax
4. int b=10, a=5,c=4; c*=++b – a--;
c) Run-time d) Logical
a) c=15 b) c=22 c) c=24 10.Computer can execute the code in the
d) c=28
5. Operation “a = a * b + a” can also be form of ……………
written as ………… a) high-level language b) assembly language
a) a *= b + 1; b) c = a * b; c) machine language d) any language
a = c + a;
11.What will be the output of the following
c) a = (b + 1) * a; d) All Answers. C code?
6. What type of structure is this?

a) For-loop b) Switch a) No output b) TESTING


c) while d) do- while c) Error d) None
Page 1 of 4 Model 1 Assoc. Prof. Mohamed Moawad
12. What will be the output of the 14. What will be the output of the following
following C code? C code?

a) a=0, b=0, c=0, b) a=0, b=0,c=-1,


d=1 d=1 a) b)

c) a=0, b=0, c=1, d) a=0, b=1, c=0,


d=0 d=0
13. What will be the output of the
following C code?
c) d)

a) a=2, b=4 b) a=3, b=3


c) a=4, b=1 d) a=2, b=3

Part 2: Questions 1 to 13 (13 Marks)


1. What will be the output of the following 2. What will be the output of the following
code? C code if the user enters 3?

a) a=1, b=1 b) a=2, b=2


c) a=1, b=2 d) a=2, b=1

a) 1 b) 2 c) 12 d) Run time error

Page 2 of 4 Model 1 Assoc. Prof. Mohamed Moawad


3. What will be the output of the following a) a=10, c=10 b) a=10, c=11
code? c) a=11, c=10 d) a=11, c=11

6. What will be the output of the following


C code?

a) 0, 1, 1 b) 1, 0, 1
c) 0, 0, 1 d) 0, 0, 0
4. Which of the following has the same meaning
as the given code?
a) yes b) no c) yes no d) Error
7. What will be the output of the following
C code?

a) b)

c) d) None
a) Singapore. b) Singapore
Poland
c) Singapore d) England Poland.
England Poland.

5. What will be the output of the following C 8. What will be the output of the following
code? C code?

a) No output b) 5
c) Hello d) Run time error

Page 3 of 4 Model 1 Assoc. Prof. Mohamed Moawad


9. What will be the output of the following C 12. What will be the output of the following
code? C code?

a) 39 24 63 b) 24 39 45
a) 11 10 12 13 b) 10 10 12 12
c) 24 39 63 d) 39 24 45
c) 13 12 10 11 d) 13 11 12 13

10. To use Switch-statement the used 13. What will be the output of the following
variable type should be ………. C code?
a) String b) Float
c) Integer d) none

11. What will be the output of the following C


code?

a)SILVER COPPER b) TIN COPPER


c) COPPER d) Run Error

a) 17 b) 11 c) 12 d) 7

Page 4 of 4 Model 1 Assoc. Prof. Mohamed Moawad

You might also like