Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

CSCI Midterm Review – Comprehensive Study Guide and Practice Questions

Rating
-
Sold
-
Pages
37
Grade
A+
Uploaded on
31-03-2026
Written in
2025/2026

This document provides a comprehensive midterm review for CSCI courses, including programming fundamentals, algorithms, and data structures, with practice questions and verified answers.

Institution
CSCI
Course
CSCI

Content preview

For the following pseudo-code, indicate how many 3
times the loop body will execute for the input values: 2
5 -3 4 6.


userNum = 3
3/30/2026, 5:30:11 PM 3/30/2026, 5:30:09 PM
while (userNum > 0) {
// Do something
cin>> userNum
}


Given the following pseudo-code, how many times 10
will the "inner loop body" execute?


int row
int col
for(row = 0; row < 2; row = row + 1) { (CSCI Midterm Review (2026 Edition)
for(col = 0; col < 5; col = col + 1) {
// Inner loop body }
}

, Given the following pseudo code, indicate j's value at 0
the end of iteration i = 2.


for (int i = 0; i < 5; ++i) {
int j = 0
3/30/2026,
j = j * i 5:30:11 PM 3/30/2026, 5:30:09 PM
}


Given code: What is the final grade? final grade is C


double gradePoints = 85;
char final_grade = 'F';


if(gradePoints > 90)
final_grade = 'A';
if(gradePoints > 80)
(CSCI Midterm Review (2026 Edition)
final_grade = 'B';
if(gradePoints > 70)
final_grade = 'C';
else if(gradePoints > 60)
final_grade = 'D';

, Consider the if-elseif-else structure below: Invalid entry


if (x < -10)
cout<< "Disagrees"
else if (x == 10)
3/30/2026, 5:30:11 PM
cout<<"Neutral" 3/30/2026, 5:30:09 PM
else if (x > 0)
cout<<"Agrees"
else
cout<<"Invalid entry"




(CSCI Midterm Review (2026 Edition)

, Find the output key is 1 key is 2
int key = 1;


switch(key){
case 1:
3/30/2026,
cout <<5:30:11
"key is 1 PM
"; 3/30/2026, 5:30:09 PM
case 2:
cout << "key is 2 "; break;
case 3:
cout << "key is 3 ";
case 4:
cout << "key is 4 ";
default:
cout << "key is default "; break;}


Out put given as: num1 + num2 is 21 PrintSum(0 , 21);
(CSCI Midterm Review (2026 Edition)
The possible function call will be


void PrintSum(int num1, int num2) {
cout << num1 << " + " << num2 << " is " << (num1 + num2);
}

Written for

Institution
CSCI
Course
CSCI

Document information

Uploaded on
March 31, 2026
Number of pages
37
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$12.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
doingqwerty
4.0
(1)

Also available in package deal

Thumbnail
Package deal
CS & CSCI 2010/1010/1300 – Comprehensive Practice Questions and Study Guides
-
16 2026
$ 207.84 More info

Get to know the seller

Seller avatar
doingqwerty Harvard University
View profile
Follow You need to be logged in order to follow users or courses
Sold
249
Member since
5 months
Number of followers
0
Documents
146
Last sold
1 day ago

4.0

1 reviews

5
0
4
1
3
0
2
0
1
0

Trending documents

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions