0% found this document useful (0 votes)
18 views2 pages

Demo PPS

This document provides a sample exam for a Programming and Problem Solving course. It is divided into 4 parts assessing expression evaluation, error finding and code fixing, output tracing of code snippets, and writing full programs. The exam instructions state that the question patterns will remain the same but marks and numbers may vary for the actual mid-term. Students are warned against plagiarism and encouraged to ask their teacher for help understanding any questions. The exam is designed to test analytical ability and programming skills in C/C++.

Uploaded by

Iftimam
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)
18 views2 pages

Demo PPS

This document provides a sample exam for a Programming and Problem Solving course. It is divided into 4 parts assessing expression evaluation, error finding and code fixing, output tracing of code snippets, and writing full programs. The exam instructions state that the question patterns will remain the same but marks and numbers may vary for the actual mid-term. Students are warned against plagiarism and encouraged to ask their teacher for help understanding any questions. The exam is designed to test analytical ability and programming skills in C/C++.

Uploaded by

Iftimam
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/ 2

Daffodil International University

Department of Computer Science & Engineering


Faculty of Science & Information Technology
Demo Mid-Term Examination Semester: Summer 2020
Course Code: CSE 122 Course Title: Programming & Problem Solving
Section: All Batch: Day
Time: 2.0 hours Full Marks: 25
Answer all of the following Questions
[These are just sample questions .Main Mid questions will use more analytical ability. The pattern will
remain same though ]
Part – I(Expression Evaluation): [5.0]
Evaluate the following expressions using the last 4 digit of your ID as the value of A, B, C &
D consecutively. If your ID is 191-15-9892 then A=9, B=8, C=9 & D=2. If there is a 0 in
the last four digit of your ID then replace it with 5. Remember all the variable here is
integer.
[In Mid Question there will be 3 to 5 expressions to evaluate. Each will contain 1 to 2 marks.
You have to evaluate the expression in detailed steps. ]
a) E = A + B * C / D [2.5]
b) G = B && A ++ [2.5]

Part – II(Error Finding & Bug Fixing): [6.0]


[In Mid Question there will be 1 to 2 codes for finding errors and rewrite the fixed code. ]
a) Mention how many errors you can find in the following code. Explain the errors as per your [4]
understanding [If you write the exact errors like a compiler it will not be counted] with line no.
and why you think it as an error.
1. #include(stdio.h)
2. Int main() {
3. int a = 10;
4. printf(“The value of a - %d!”, a);
5. return 0
6. }
b) Rewrite the code without any errors. [2]

Part – III(Output Tracing): [6.0]

[In Mid Question there will be 2 to 3 codes for finding the output. For answering this segment create a
box in your answer script and image that the box is your output window of the compiler. Now write
output for each code. If you are ask to take input from user like in question b then the input will
always be the last two digits of your ID. ]

a) #include<stdio.h> b) #include<stdio.h> [5]


int main() { int main() {
printf(“\tHate!!\nDemo Exam!\n”); int num;
return 0; scanf(“%d”,&num); [5]
} printf(“num = %d\n”, num);
return 0;
}

GOOD LUCK
Part IV(Full Program Writing): [8.0]

[In Mid Question there will be 3 to 4 problems for which you have to write full C/C++ program. Please
read notes very carefully for each problems. ]

a) On a wild Journey you met a beautiful creature called Pinocchio. Now you want to introduce 8.0
yourself to it. But it only understands the C language. Can you write a code to introduce yourself
to Pinocchio?
Sample Input Sample Output
Hello Pinocchio! My name is Saiful.

[Notes: Here for this problem there are no inputs. You have to write your own name in place of “Saiful”.]

Instructions for Mid-Term:

 The Question patterns will remain same, but the marks and no. of questions for each
part may vary.

 Be aware before communicating with anyone else at the time of exam as all the
questions are unique for each of you.

 Remember there is an automated plagiarism checker installed in BLC and the system
will add auto negative marks if you copy from anywhere or anyone.

 If you find any kind of difficulty to understand any part of the demo questions then
do give me a knock.

 Your course teacher is always there for you. Believe in your teacher and Try your best
to give a clean and honest exam.

GOOD LUCK

You might also like