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)

CS 159 Final Exam T/F Questions With Correct Answers

Rating
-
Sold
-
Pages
16
Grade
A+
Uploaded on
09-06-2026
Written in
2025/2026

CS 159 Final Exam T/F Questions With Correct Answers...

Institution
CS 159
Course
CS 159

Content preview

CS 159 Final Exam T/F Questions With
Correct Answers
True - ANSWER A C program begins with a section for preprocessor directive.

True - ANSWER The preprocessor is a part of the compiling process and
prepares your code for the remainder of that process.

True - ANSWER Every program must have exactly one function named main.

True - ANSWER The main function is the starting point for execution of the
program.

True - ANSWER Within each function the local declarations and executable
statements must NOT be permitted to overlap.

True - ANSWER Variable declarations will NEVER be permitted in the global
section this semester.

True - ANSWER The files stdio.h and math.h are libraries that contain standard
functions for our use.

True - ANSWER The return 0; statement will be the final statement in the main
function.

False - ANSWER The return statement in main will return control back to the first
statement in main.

True - ANSWER Comments are added to a program to improve its level of
documentation intended for other programmers.

True - ANSWER The course program headers are multi-line comments.

True - ANSWER You should place a single space between all operators and
operands.

True - ANSWER All variables should be commented to the right of each
declaration.

False - ANSWER You should declare multiple variables on one line.

,True - ANSWER Select meaningful identifiers (names) for all variables in your
program.

True - ANSWER Rarely are single character identifiers considered meaningful
for variables in a program.

True - ANSWER Do not single (or double) space the entire program, use blank
lines when appropriate.

True - ANSWER There is no need to include example output with your
submission.

True - ANSWER All code found between { and } should be indented two
additional spaces.

True - ANSWER The file you submit for lab #1 must be named lab01.c

True - ANSWER Multi-line comments cannot be nested.

True - ANSWER An identifier cannot begin with a digit character.

False - ANSWER In addition to alphabetic and digits characters it is acceptable
to use underscores, dashes, and periods as part of an identifier.

True - ANSWER The data type of a variable will determine the amount of memory
that is necessary to reserve for it.

True - ANSWER The operators that can be applied to a value are restricted by its
data type.

True - ANSWER A variable that is not initialized at the time it is declared will be
storing an unknown value.

True - ANSWER The use of symbolic/defined constants can improve the
documentation of a program.

True - ANSWER In most cases the definition of symbolic/defined constants will
not terminate with a semi-colon.

True - ANSWER A literal constant is data that is not represented by any other
symbol in a given expression.

True - ANSWER A printf function is composed of a format string and a data list.

False - ANSWER A scanf function is composed of a format string and a data list.

, True - ANSWER The selection of a conversion code in a format string depends
on the type of value it will represent.

True - ANSWER A width modifier is used to reserve a given number of spaces to
assist with the alignment of the value being displayed.

False - ANSWER The precision modifier can specify the number of digits to
display yon both sides of the decimal-point with a floating-point value.

False - ANSWER A single scanf function call can be used to display the prompt
for input to the user and accept the input from the user.

True - ANSWER While commonly used in printf function the scanf function would
not make use of the '\n' character.

True - ANSWER The use of literal constants should be minimized and the use of
symbolic/defined constants should be maximized in your program.

True - ANSWER A program that does not compile cannot be successfully
submitted for grading.

True - ANSWER Any compiler warnings remaining in a submission will result in a
loss of points.

True - ANSWER The implementation of advanced concepts, those yet to be
introduced in lecture, is not permitted in an assignment unless otherwise
specified.

True - ANSWER All of the compound assignment operators share the same level
of operator precedence.

True - ANSWER The result of an expression in undefined when it attempts to
modify a single variable more than once.

True - ANSWER A single-type operation will generate a result of that same type.

True - ANSWER When evaluation an operator with mixed-type operands it is the
lower ranked data type that is converted to that of the higher ranked data type.

False - ANSWER The use of a precision modifier when displaying a floating-point
value will result in truncating all digits beyond the specified precision value.

True - ANSWER An explicit type conversion can be used to temporarily alter the
data type in an expression from its declared type.

Written for

Institution
CS 159
Course
CS 159

Document information

Uploaded on
June 9, 2026
Number of pages
16
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$19.49
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.
Zayla Liberty University
Follow You need to be logged in order to follow users or courses
Sold
117
Member since
3 year
Number of followers
13
Documents
14757
Last sold
23 hours ago

3.4

17 reviews

5
5
4
3
3
5
2
2
1
2

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