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)

CNIT 315 EXAM 2 QUESTIONS WITH VERIFIED ANSWERS

Document preview thumbnail
Preview 2 out of 6 pages

CNIT 315 EXAM 2 QUESTIONS WITH VERIFIED ANSWERS

Content preview

CNIT 315 EXAM 2 QUESTIONS WITH VERIFIED
ANSWERS


Data field - Answers - data items that are entities themselves (ex. Name: __________)

Record - Answers - all data fields form a single field called this

Structure - Answers - In C a record is referred to as this

Structure's form - Answers - consists of the symbolic names, data types, and
arrangement of individual data fields in the record

Structure's contents - Answers - consist of the actual data stored in the symbolic names

Single Structure layout - Answers - struct
{
int month;
int day;
int year;
} birth;

Single Structure definition - Answers - Reserves storage for the individual data items
listed in the structure

Members of the structure - Answers - data items declared in the struct (ex. int month;)

Populating the structure - Answers - Assigning actual data values to the data items of a
structure

Rigid - Answers - Spacing of a structure is not ________

Structure type name - Answers - defined by user and first letter is capital (ex. struct
Date)

Arrays - Answers - Initialization of structures follows the same rules as for the
initialization of ___________

True - Answers - Structure members can be of any data type

struct
{
char name[20];
struct Date birth;

, } person;

Valid: person.name[4]; - Answers - Individual members can be arrays and structures,
advantage that same structure type can be used in a list many times

NUMRECS 5 - Answers - Used to define an array of data

0/nulls - Answers - Without explicit initializers, the numeric elements of both static and
external arrays or structures are initialized to ______________

Parallel arrays - Answers - are two or more arrays, where each array has the same
number of elements and the elements in each array are directly related by their position
in the arrays, rarely used anymore

display(emp.idNum) ;
calcPay(emp.payRate,emp.hours); - Answers - Individual structure members may be
passed to a function in the same manner as any scalar variable

calcPay(emp); - Answers - On most compilers, complete copies of all members of a
structure can also be passed to a function by including the name of the structure as an
argument to the called function

Reference - Answers - A structure can be passed by this ( ex. calcNet(&emp);
double calcNet(struct Employee *pt)
(*pt).idNum or *pt->idNum )

++ and -- - Answers - can be applied to structures (ex. ++pt->hours
(pt++)->hours
(++pt)->hours )

Union definiton - Answers - is a data type that reserves the same area in memory for
two or more variables, only one at a time though, reserves sufficient memory locations
to accommodate its largest member's data type

Union layout - Answers - union
{
char key;
int num;
double price;
} val;

struct
{
char uType;
union
{

Document information

Uploaded on
July 26, 2026
Number of pages
6
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$13.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.
GEEKA
3.8
(361)
Sold
2138
Followers
1448
Items
58671
Last sold
14 hours 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