Final Exam prepared for the university. Used Microsoft Word
Ghulam Ishaq Khan Institute of Engineering Sciences and Technology
Faculty of Computer Science and Engineering
CS 101
Name ___________________________
Spring 2020 Semester
Roll No: ___________________
Final Examination
Thursday-
Total Time: 3:00 hours
Total Marks:100
Course Instructor:
Dr. Khalid J. Siddiqui
You are advised to READ these notes:
1. This is an individual Exam. Do your own work honestly and maintain the integrity of your
individual work. Write down the time you took. Late work may be accepted with increasing
penalty – 1% points off for every 5 minutes.
2. Attempt all questions. Please encircle/check the correct choice for MCQs.
3. For all segments of code, assume that they are written in main function with return statements.
Assume also that the relevant header files are already included.
4. Overwriting OR Cutting is not allowed.
5. This paper consists of 100 MCQs.
6. Attempt MCQs on the answer sheet attached, the one after this page.
7. After asked to commence the exam., please verify that you have fourteen (14) different printed
pages including this title page with 100 MCQ questions and one coding question.
8. The invigilator is not supposed to answer any questions. No one may come to you for corrections
and you are not supposed to request to call anyone. Make assumptions wherever required and
clearly mark them.
Enjoy!
CS101-Final Examination, Spring 2020
1
Question
-
A
B
C
Please tick () the correct option only
D Question
A
B
C
D
Question-
CS101-Final Examination, Spring 2020
A
B
C
D
2
Q1: What is the output of the following code?
int x=0;
while(x++ < 10)
;
cout<=5)
break;
x++;
}
cout<>string1; //The user enters
"Dear Student", if pormpted to do so
cin>>string2; //The user enters
"Good Luck", if pormpted to do so
cout< 0; iter-- ){
for ( int j = size - 2; j >= 0; j-- ){
if ( a[ j ] < a[ j + 1 ] ) {
temp = a[ j ];
a[ j ] = a[ j + 1 ];
a[ j + 1 ] = temp;
}
}
}
}
int main(){
int b [10]={1,4,2,6,5,8,7,10,9,11};
Fun( b, 10 );
for (int i= 0; i < 10; i++ )
cout << " "<< b[ i ];
return 0;
}
A.
B.
C.
D.
-
9
9
5
6
8
8
6
5
7
7
7
8
6
6
8
7
B.
C.
D.
10
40
50
None of above
int main(){
int
MAT[3][3]={{10,20,30},{40,50,60},{70,
80,90}};
cout<6)
continue;
cout<=1;i--)
{
for(j=0;j