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)

CPSC - 120 Final Exam Questions And Answers | Guaranteed Pass!!!

Rating
-
Sold
-
Pages
8
Grade
A+
Uploaded on
07-11-2024
Written in
2024/2025

CPSC - 120 Final Exam Questions And Answers | Guaranteed Pass!!!

Institution
CPSC 120
Course
CPSC 120

Content preview

CPSC - 120 Final Exam Questions And
Answers | Guaranteed Pass!!!
instructions CORRECT ANSWERS A program is a set of _____________.

variable CORRECT ANSWERS A(n) _____________ is a named storage location.

Input CORRECT ANSWERS ___________ is information a program gathers from the
outside world.

Output CORRECT ANSWERS __________ is information a program sends to the
outside world.

ALU (Arithmetic Logic Unit), CU (Control Unit) CORRECT ANSWERS Internally, the
CPU consists of the _________________ and the ______________.

High level CORRECT ANSWERS _______ __________ languages are close to the
level of humans in terms of readability.

Low level CORRECT ANSWERS _______ __________ languages are close to the
level of the computer.

Syntax - error when compiling/creating a program

Logical - mistake in the programming such as instructions in the wrong order
CORRECT ANSWERS What is the difference between a syntax error and a logical
error?

The variable area is defined before it asks the user for inputs. CORRECT ANSWERS
The following pseudocode algorithm has an error. The program is supposed to ask the
user for the length and width of a rectangular room, and then display the room's area.
The program must multiply the width by the length in order to determine the area. Find
the error.

area = width x length
Display "What is the room's width?".
Input width.
Display "What is the room's length?"
Input length.
Display area.

iostream CORRECT ANSWERS To use cout statements you must include the
____________ file in your program.

, # CORRECT ANSWERS Preprocessor directives begin with a ____.

g = pow(a, 3) / (pow(b, 2) * pow(k, 4)); CORRECT ANSWERS Write the c++ expression
for the following algebraic expression.

g = (a^3)/(b^2 * k^4)

iostream and iomanip CORRECT ANSWERS What header files must be included in the
following program?

float amount = 89.7;
cout << fixed << showpoint << setprecision(1);
cout << setw(8) << amount << endl;

-No semicolon after int main()
-Missing semicolon after a = 3
-Missing semicolon after b = 4
-Missing semicolon after c = a + b
-Braces are backwards
-Brackets are wrong way in cout line
-Cout shouldn't be capital
-C shouldn't be capitalized in last line CORRECT ANSWERS The following program
contains syntax errors. Locate as many as you can.
//what is wrong with this program??
#include iostream
using namespace std;

int main();
}
int a, b, c \\ define 3 integers
a=3
b=4
c=a+b
Cout >> "The value of c is " >> C;
return 0;
{

cout << "Two mandolins like creatures in the\n\n\n";
cout << "dark\n\n\n";
cout << "Creating the agony of ecstasy.\n\n\n";
cout << " - George Barker"; CORRECT ANSWERS Modify the following program so that
it prints two blank lines between each line of text.

cout << "Two mandolins like creatures in the"; cout << "dark";
cout << "Creating the agony of ecstasy.";
cout << " - George Barker";

Written for

Institution
CPSC 120
Course
CPSC 120

Document information

Uploaded on
November 7, 2024
Number of pages
8
Written in
2024/2025
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.
ElevatedExcellence Exam
View profile
Follow You need to be logged in order to follow users or courses
Sold
916
Member since
3 year
Number of followers
504
Documents
18331
Last sold
2 days ago
GETSOCIO EDUCATION

We have launched our assignments at a very reasonable price so that every student can enjoy its features. Our new method is gathering quite a positive feedback from the students, and many of our alumnus are fully satisfied with it. We would be glad if you purchase from us. THANK YOU!!

3.8

173 reviews

5
78
4
36
3
28
2
10
1
21

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