0% found this document useful (0 votes)
29 views4 pages

Midterm2024 Model3 Answer

The document contains a 4 page exam for an intro to computer systems course. It has two parts with multiple choice questions testing knowledge of C programming basics like variables, operators, loops, functions, and output.

Uploaded by

BADR ESLAM
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views4 pages

Midterm2024 Model3 Answer

The document contains a 4 page exam for an intro to computer systems course. It has two parts with multiple choice questions testing knowledge of C programming basics like variables, operators, loops, functions, and output.

Uploaded by

BADR ESLAM
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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 2) (3-4-2024) – Spring Semester
Name: ID: Program:

Part 1: Questions 1 to 14 (7 Marks)

1. What will be the output of the 5. The parallelogram symbol in the


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

a) Linker b) Syntax
c) Run-time d) Logical
12. Computer can execute the code in the
form of ……………
a) high-level language b) assembly language
c) machine language d) any language
13. What will be the output of the
following C code?
a) b)

c) d)

a) No output b) TESTING
c) Error d) None

Part 2: Questions 1 to 13 (13 Marks)

1. What will be the output of the following C 2. What will be the output of the following
code? code?

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


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

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

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


6. What will be the output of the following
3. What will be the output of the following C
code?
code?

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

a) b)

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

5. What will be the output of the following C


code? c) d) None

8. What will be the output of the


following C code?

a) 39 24 63 b) 24 39 45
c) 24 39 63 d) 39 24 45

a) a=10, c=10 b) a=10, c=11


c) a=11, c=10 d) a=11, c=11

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


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

a) 11 10 12 13 b) 10 10 12 12
c) 13 12 10 11 d) 13 11 12 13

10. What will be the output of the following C a)SILVER COPPER b) TIN COPPER
code if the user enters 3? c) COPPER d) Run Error
13. What will be the output of the
following C code?

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

a) 17 b) 11 c) 12 d) 7
11. What will be the output of the following C
code?

a) 11 10 12 13 b) 10 10 12 12
c) 13 12 10 11 d) 13 11 12 13

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

You might also like