100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

CS 159 EXAM QUESTIONS WITH CORRECT SOLUTIONS

Rating
-
Sold
-
Pages
23
Grade
A+
Uploaded on
27-11-2025
Written in
2025/2026

CS 159 EXAM QUESTIONS WITH CORRECT SOLUTIONS

Institution
CS 159
Course
CS 159










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
CS 159
Course
CS 159

Document information

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

Subjects

Content preview

CS 159

A C program begins with a section for preprocessor directive. - Answers-True



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



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



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



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



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



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



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



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



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

,The course program headers are multi-line comments. - Answers-True



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



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



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



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



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



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



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



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



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



Multi-line comments cannot be nested. - Answers-True



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



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

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



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



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



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



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



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



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



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



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



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

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.
Rosetopgrader Nursing
View profile
Follow You need to be logged in order to follow users or courses
Sold
30
Member since
1 year
Number of followers
8
Documents
3803
Last sold
2 months ago

5.0

8 reviews

5
8
4
0
3
0
2
0
1
0

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