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
Document preview thumbnail
Preview 2 out of 10 pages
Exam (elaborations)

COSC 1436 PRACTICE EXAM ALL QUESTIONS AND ANSWERS GRADED A+

Document preview thumbnail
Preview 2 out of 10 pages

COSC 1436 PRACTICE EXAM ALL QUESTIONS AND ANSWERS GRADED A+

Content preview

COSC 1436 PRACTICE EXAM ALL QUESTIONS AND
ANSWERS GRADED A+
✔✔True - ✔✔Each byte in memory is identified by a unique number known as an
address.

✔✔// - ✔✔single line comment

✔✔/* */ - ✔✔block comment

✔✔# - ✔✔beginning of preprocessor

✔✔; - ✔✔end of a complete statement

✔✔endl - ✔✔new line

✔✔" " - ✔✔used to signify a string

✔✔' ' - ✔✔used to signify a character

✔✔{ } - ✔✔enclose a group of statements (such as lines in a function)

✔✔\ - ✔✔escape character

✔✔Constant identifier names must be written in all caps - ✔✔Which of the following is
NOT true regarding named constants?
Use the following keyword to define a constant: const
Constant identifier names must be written in all caps.
An initialization value must be given at a declaration/definition time.
A compiler error will occur if a statement attempts to change the value of a constant.

✔✔+ - ✔✔addition

✔✔- - ✔✔subtraction or negation

✔✔* - ✔✔multiplication

✔✔/ - ✔✔division

✔✔% - ✔✔modulus/remainder

✔✔= - ✔✔assignment

✔✔int - ✔✔What is the correct data type of this literal: -342

, ✔✔double/float - ✔✔What is the correct data type of this literal: 9.0

✔✔string - ✔✔What is the correct data type of this literal: "Hello"

✔✔char - ✔✔What is the correct data type of this literal: 'X'

✔✔string - ✔✔What is the correct data type of this literal: "X"

✔✔bool - ✔✔What is the correct data type of this literal: true

✔✔1stNum - ✔✔Which of the following is NOT a legal identifier?
_firstNum
num_1
first_num
1stNum
firstNum

✔✔1 - ✔✔How many bytes are needed to store: 'n'

✔✔2 - ✔✔How many bytes are needed to store: "n"

✔✔1 - ✔✔How many bytes are needed to store: '\n'

✔✔2 - ✔✔How many bytes are needed to store: "\n"

✔✔4 - ✔✔How many bytes are needed to store: "\\n\\"

✔✔b=a+2 - ✔✔Write a statement that adds 2 to the variable a and stores the result in
the variable b.

✔✔b=a-8 - ✔✔Write a statement that subtracts 8 from the variable a and stores the
result in the variable b.

✔✔Erroneous value - ✔✔Based on the following code and the following input, what will
be the value in the variable num3 after the cin line:

int num1, num2, num3;
char symbol;
cout << "Enter the data: ";
cin >> num1 >> symbol >> num2 >> num3;

Input:
48 18 * 28 $

Document information

Uploaded on
October 31, 2025
Number of pages
10
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$12.49

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

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.
BOARDWALK
3.5
(41)
Sold
283
Followers
10
Items
32850
Last sold
1 week ago



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