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 6 pages
Exam (elaborations)

CS 354 EXAM 1 QUESTIONS WITH 100% CORRECTLY SOLVED ANSWERS.

Document preview thumbnail
Preview 2 out of 6 pages

CS 354 EXAM 1 QUESTIONS WITH 100% CORRECTLY SOLVED ANSWERS.

Content preview

CS 354: EXAM 1 QUESTIONS WITH 100% CORRECTLY SOLVED
ANSWERS.


1) Function -- Answer ✔✔ a module of code, similar to Java methods
t t t t t t t t t t t




2) Caller function -- Answer ✔✔ start new functions
t t t t t t t




3) Callee function -- Answer ✔✔ function being called
t t t t t t t




4) Command line arguments -- Answer ✔✔ a white space separated list of input entered
t t t t t t t t t t t t t




after the command prompt
t t t t




5) Program arguments -- Answer ✔✔ follows after the program name (e.g. file names,
t t t t t t t t t t t t t




options that select specific behavior)
t t t t




6) Structure -- Answer ✔✔ - defines a new type in C/C++
t t t t t t t t t t




- describes a compound unit of storage having parts called data members whose t t t t t t t t t t t t




values can change t t




- is accessed using its identifier and member selection to get a particular data
t t t t t t t t t t t t t




member
- when allocated it’s a contiguous fixed size block of memory
t t t t t t t t t




7) Dot operator -- Answer ✔✔ does member access
t t t t t t t




8) Points to operator -- Answer ✔✔ does dereferencing first and the member selection
t t t t t t t t t t t t




9) Format string -- Answer ✔✔ contains format specifier and chars to skip
t t t t t t t t t t t




10) Format specifiers -- Answer ✔✔ - %d %f %p %s %i
t t t t t t t t t t




- each format specifier must match type of destination var
t t t t t t t t

, 11) Whitespace -- Answer ✔✔ - input specifiers (spaces, tab, newline) t t t t t t t t t




- leading white space is skipped t t t t




12) Format string -- Answer ✔✔ - contains format specifiers and char to display
t t t t t t t t t t t t




- \n to flush output buffer t t t t




- each format specifier must match source var t t t t t t




13) Global variable -- Answer ✔✔ - declared outside any function
t t t t t t t t t




- accessible to all functions in the source file t t t t t t t




- allocated in the data segment before execution begins t t t t t t t




14) Static local variable -- Answer ✔✔ - declared inside a function with "static" modifier
t t t t t t t t t t t t t




- accessible only within its function t t t t




- allocated in the data segment t t t t




15) Shadowing -- Answer ✔✔ - when local variable has same name as global variable
t t t t t t t t t t t t t




- blocks access to global var with same name t t t t t t t




16) Argument -- Answer ✔✔ data "values" caller passes to callee
t t t t t t t t t




17) Parameter -- Answer ✔✔ variable where callee stores caller's args
t t t t t t t t t




18) Pass by value -- Answer ✔✔ copy of argument is stored in corresponding parameter
t t t t t t t t t t t t t t




variable

19) Return by value -- Answer ✔✔ a copy of return value replaces function call
t t t t t t t t t t t t t




20) Dangling else -- Answer ✔✔ else pairs with nearest unpaired if, to avoid use braces
t t t t t t t t t t t t t t




21) Scalar variable -- Answer ✔✔ a unit of storage whose contents can change (aka
t t t t t t t t t t t t t t




primative)

22) Identifier -- Answer ✔✔ name associated with variables address in memory
t t t t t t t t t t




23) Value -- Answer ✔✔ data stores in variables memory
t t t t t t t t

Document information

Uploaded on
January 23, 2025
Number of pages
6
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$10.99

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
Topclass
5.0
(1)
Sold
2
Followers
0
Items
531
Last sold
1 year 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