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)

CMSC 140- FINAL EXAM 2025/2026 QUESTIONS AND ANSWERS 100% PASS

Rating
-
Sold
1
Pages
10
Grade
A+
Uploaded on
04-11-2025
Written in
2025/2026

CMSC 140- FINAL EXAM 2025/2026 QUESTIONS AND ANSWERS 100% PASS

Institution
CMSC 140
Course
CMSC 140

Content preview

CMSC 140- FINAL EXAM 2025/2026
QUESTIONS AND ANSWERS 100% PASS




QUESTION 1:


The last legal subscript that can be used with the array intlist declared below (see array
declaration below) is [×1)

Avray declaration: intlist [10] - ANS 9


QUESTION 2:


Indicate If the following condition is True or False
Assume the variables x=5 y=6 and z=8

7 <=(x+y) && z > 4 - ANS True


QUESTION 3:
Choose the best answer to fill in the blank in the statement below.

A (An) BLANK function is a function that doesn't return a value. - ANS Void


QUESTION 4:


Indicate if the following expression is True or False


1 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED

, Assume the variables int a=3, b=4, c=6,

4!=b || c! = (a+3) - ANS True


QUESTION 5


Using a looping structure, prompt uner for positive integer values from the keyboard. Ignore all
negative values and terminate the loop once a value that is greater than 10 is entered. After the
loop ends , print the total of the read integers


Enter an integer 4
Enter an integer 8
Enter an integer 0
[Console] invalid please try again
Enter an integer 10
Enter an integer: 11

Total: 22 - ANS #include <iostream>
using namespace std;


int main() {
int total = 0, num;


while (true) {
cout << "Enter an integer: ";
cin >> num;


if (num < 0)
cout << "Invalid input. Please try again." << endl;
else if (num > 10)
break;

2 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED

Written for

Institution
CMSC 140
Course
CMSC 140

Document information

Uploaded on
November 4, 2025
Number of pages
10
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$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
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Fyndlay Kaplan University
Follow You need to be logged in order to follow users or courses
Sold
409
Member since
2 year
Number of followers
81
Documents
20069
Last sold
2 days ago
Scholar\'s Sanctuary.

Explore a Vast Collection of Finely Made Learning Materials.

3.7

73 reviews

5
32
4
11
3
14
2
6
1
10

Recently viewed by you

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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions