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

IT Final (Approved)

This document contains instructions for a final exam in Introduction to Information Technology. It provides information for students such as credentials needed, use of webcams, placement of notes, and prohibitions on mobile devices. The exam contains 9 questions covering a range of topics like programming, loops, functions, arrays, and calendars. Students have 2.5 hours to complete the exam and then must upload their answers as a PDF file to MS Teams. Cheating is strictly prohibited.

Uploaded by

rafey h
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)
34 views4 pages

IT Final (Approved)

This document contains instructions for a final exam in Introduction to Information Technology. It provides information for students such as credentials needed, use of webcams, placement of notes, and prohibitions on mobile devices. The exam contains 9 questions covering a range of topics like programming, loops, functions, arrays, and calendars. Students have 2.5 hours to complete the exam and then must upload their answers as a PDF file to MS Teams. Cheating is strictly prohibited.

Uploaded by

rafey h
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

INSTITUTE OF SPACE TECHNOLOGY

DEPARTMENT OF ELECTRICAL ENGINEERING


108415- Introduction to Information Technology
Batch & Section: BS EE-19 (A & B) Assessment Final/OHT: Final (Subjective) Prepared by (sign): Saniya Zafar
Student Registration No.: Max Time Allowed: 2.5 hours (exam solving) + 15 mins (exam uploading)
Student Full Name: Max Marks: 15 (objective) + 85 (subjective) =100 Approved by (sign): Dr. Khurram Khurshid

 Provide your credentials on this question paper.


 Turn on your webcams as this is an online exam
 Place your notes and other helping materials far from your exam desk
 Be sure that you do not possess a mobile or other electronic gadget during the exam time
 Leaving your exam place during exam is not allowed
 Please go through your exam and ask queries in first 10 minutes of exam
 Answer all the questions on your answer sheet and make a pdf file and upload on MS Teams.
 Cheating by all means is prohibited and any such attempt may leads to serious consequences.

Question # 1 (Objective type MS Forms printed) [Q Marks-15]

Question # 2 [Q Marks-10]
a) Remove programming/ syntax errors from the following. [4 marks]

CODE CORRECTED CODE


int main()

int a,b;

cin<<a;

b=a;

cout <<"b=",a;

};

#include “iostream”

int main()

const PI=3.14;

int r,h;

cout>>”Enter values of r and h’

cin>>r,h;

v=PI*r*r*h;

05012021 Session-2020 1/4


cout<<’volume=”<<v;

b) What is the output when the following code and explain the output at their respective steps? [6]

CODE OUTPUT
include<iostream>
using namespace std;
int main()
{
int num1=100, num2=200;
cout << "number 1 is " <<
num1 <<"\t" << "number 2 is" << num2 <<
"\n" ;
if (num1 <= 100)
{
num1 += num2;
num2 += num1;
}
else
{
num2 -= 20;
num1 -= num2;
}
if (num2 <= 200)
{
num2 -= num1;
num1 -= num2;
}
else
{
num1 -= 100;
num2 -= num1;
}
cout << num1 <<"\n";
cout << num2;
system("pause");
return 0;
}

Question # 3 [Q Marks-5]
How does C++ program works? Explain each step with the help of figure.

Question # 4 [CLO-02 & 03; PLO-02; Q Marks-15]


Differentiate between while loop and do-while loop by developing the flow charts. Also, develop C++ code for
both the algorithms using the example of printing negative numbers from -100 to -1.

05012021 Session-2020 1/4


Question # 5 [Q Marks-10]
Create a calculator that takes a number, a basic math operator (*,/,^), and a second number all from user input,
and have it print the result of the mathematical operation. The mathematical operations should be wrapped inside
of functions.

Question # 6 [CLO-02; PLO-02; Q Marks-15]


When the customer reaches the ticket booth, he/ she see the menu on the screen. In this menu there are four
sections.
1. Lahore
2. Karachi
3. Peshawar
4. Quetta

The software engineer usually travels from Rawalpindi railway station to rest of the cities. For traveling to the
following cities software engineer can select any one of the categories:
1. Rawalpindi to Lahore
a. Executive Class
b. Lower A/C
c. Economy
2. Rawalpindi to Karachi
a. Executive Class
b. Lower A/C
c. Economy
d. First Class Sleeper
e. Economy Sleeper
3. Rawalpindi to Quetta
a. First Class Sleeper
b. Economy Sleeper
4. Rawalpindi to Peshawar
a. Executive Class
b. Lower A/C
c. Economy

User can choose any of the above mentioned choices to go to different cities. From these choices further he can
choose what sort of bogie he wants. Each bogie has its own respective price. Once passenger has chosen the bogie.
This price also has 15% of tax which has to be included. Define the price for different bogies and destination by
yourself.

Develop a flow chart showing the total bill to be paid (including 15% tax). The program should work such that if
the user selects the destination, the price should be displayed.

Question #7 [Q Marks-10]
Write a C++ program that reads marks of a class (having 5 students) from the user and places them in an array of
type float. After that, it should compute average marks obtained by the class. In the end, display student number
and their marks for all those students who got marks above average.

Question # 8 [CLO-01; PLO-01; Q Marks-10]


Describe the following:

05012021 Session-2020 1/4


a. Differentiate between LAN, MAN and WAN.
b. Differentiate between counter controlled repetition and sentinel controlled repetition.
c. In the following statement, i+7 is considered as an error in program. What type of error it is? Also,
mention either the program gives output? If yes, then discuss the effect of this error on output of the
program.
for (int i=7; i<=77; i+7)

Question # 9 [Q Marks-10]
Design a program in C++ to display the calendar of a following month using multiple for loops.

NOVEMEBER 2019
Mon Tue Wed Thu Fri Sat Sun
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30

05012021 Session-2020 1/4

You might also like