CPRE288 Quiz 1
.pdf
keyboard_arrow_up
School
Iowa State University *
*We aren’t endorsed by this school
Course
288
Subject
Computer Science
Date
Apr 3, 2024
Type
Pages
3
Uploaded by AdmiralPencil12563
Quiz 1
Instructions
An exam prep and practice quiz is included in a Quizzes (Exam Prep) grade in the course. The
purpose of am exam prep quiz is to check your understanding of knowledge and concepts
(resulting in feedback to both student and instructor), provide more practice with problem-
solving exercises, and show you examples of types of questions that may be on an exam.
Up to eight exam prep quizzes will posted during the semester. The lowest quiz score will be
dropped. You are not required to complete quizzes before taking an exam. But you are strongly
encouraged to complete relevant quizzes before an exam to help you prepare for the exam.
A quiz is an individual assignment. You are expected to submit your own work. You can ask
general questions about quiz questions and have general discussions with other students. Do
not share answers to quiz questions. Please honor these expectations for academic
integrity. You can do your own work and do well.
You have up to 4 attempts to submit the quiz. Having multiple attempts will let you get back into
the quiz if you submit by mistake, or if there is some technical problem that closes the session.
It also lets you return after reviewing class materials as part of the learning process.
IMPORTANT NOTE: If you submit and go back in, you are starting over with a new attempt
(that's how Canvas works). So, just in case, record your answers outside of the quiz so you can
re-enter them if needed.
Canvas does not have a separate save option for quizzes; however, as long as you do not
submit, you can return to finish a quiz (still the same attempt).
NOTE: There is no actual due date, other than before prep week. The due date shown is a
target date so it appears in your list of assignments before the next quiz. You should complete
quizzes before each exam because they will help you prepare for and practice questions similar
to what you might find on an exam. If you need additional attempts on a quiz, please email the
instructor.
Questions
Question 1
Numbers and Variables
Given the following declarations, answer 1a-1c.
1a
What is the size of variable reg
in bytes?
Answer: 4
1b
What is the value of variable data
in binary?
Answer: 0b101101
1c
What is the range of values for variable num in hex (from the lowest integer value represented
to the highest integer value)?
Answer: 0x8000
to 0x7FFF
Question 2
Pointers and Memory
Given the following code, answer 2a - 2b.
2a
After the code executes, what is the value of variable num in decimal?
short num = 45; unsigned long reg = 45; char data = 45;
short num; short list[] = {1,2,3,4}; short *my_ptr = list; num = *my_ptr + list[2];
1. short num;
: Declares a variable num
of type short
.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
excel
Task Instructions
In the Column chart, switch the data shown In the rows
and columns.
arrow_forward
Employee view attendance report
The employee must be logged in to the
system to perform this function. The
employee selects the report period (range
of dates: from - to). The employee selects
"show report". Range of dates for the
report must be maximum 3 months, so if
the range is invalid, the system displays an
error message. The system displays every
working day in the report with the status
of the employee in this day, which could
be one of the following: on time, late, did
not come.
One actor?
One use case name?
One class ?
Attributes for the class ?
One relation between classes ?
arrow_forward
Description
Instructions
This test has a time limit of 30 minutes. This test will save and submit automa
Warnings appear when half the time, 5 minutes, 1 minute, and 30 second
Timed Test
Multiple Attempts Not allowed. This test can only be taken once.
Force Completion This test can be saved and resumed at any point until time has expired. The
Remaining Time: 16 minutes, 43 seconds.
* Question Completion Status:
A Moving to another question will save this response.
Quèstion 9
The while statement will execute the loop body if the condition evaluates to false or zero.
O True
False
A Moving to another question will save this response.
14
10
144
24
4.
3.
%
&
5
or
01
RI
7.
LLI
arrow_forward
Solar position calculatorDevelop a program or spreadsheet to calculate:The position of the Sun on the celestial vault (zenith and azimuthal angle).The solar hourTime of solar noonTime of sunrise and sunsetDeclinationThe input data are: date, standard time, location and time zone.
arrow_forward
Excel
arrow_forward
There are two options for ending tasks and preventing deadlocks:
arrow_forward
Booking Flight Ticket Via Online
case study:
“It is an electronic record of the traveller’s airline reservation, containing information such as the time, date and place of the flight, airport and seat.”
Draw use case diagrams for booking flight tickets.
2. Draw activity diagrams for booking flight tickets.
arrow_forward
A procedure that is defined by the user is called a
arrow_forward
* Question Completion Status:
Moving to another question will save this response.
Quèstion 5
Simplified form of F=y +x y+y xz is
xy + y +
x Z
xy + y (1 + y z)
xy +y (x+y z)
xy +y +xz
A Moving to another question will save this response.
arrow_forward
Geographical Information System (Design Geodatabase)
An Environmental Protection Agency is planning to simulate flood caused by a dam breach. When the dam breach occurs, the water will spill to the river below, and flood will spread to the area along the riverbanks. This flood can be simulated based on the land elevation and land cover types. The agency would like to estimate the number of houses that will get an impact from the flood, and the road network for evacuation plan. You are required to design a geodatabase that will provide necessary information for the agency.
Question:
a. Determine attributes for each dataset. b. Apply some topological rules for your datasets.
arrow_forward
Geographical Information System (Design Geodatabase)
An Environmental Protection Agency is planning to simulate flood caused by a dam breach. When the dam breach occurs, the water will spill to the river below, and flood will spread to the area along the riverbanks. This flood can be simulated based on the land elevation and land cover types. The agency would like to estimate the number of houses that will get an impact from the flood, and the road network for evacuation plan. You are required to design a geodatabase that will provide necessary information for the agency.
Question:
a. Identify data themes that need to be included in the map.b. Determine data models to represent each theme.c. Determine types of datasets in a geodatabase for each data model.d. Determine attributes for each dataset.
arrow_forward
Book Shop Inventory
A book shop uses a personal computer to maintain the inventory of books that are being sold at
the shop. The list includes details such as author, title, price, publisher, stock position, etc.
Whenever a customer wants a book, the shopkeeper inputs the title and author of the book and
the system replies whether it is in the list or not. If it is not, an appropriate message is displayed.
If book is in the list, then the system displays the book details and asks for number of copies. If
the requested copies are available, the total cost of the books is displayed; otherwise the
message "Required copies not in stock" is displayed.
A program to accomplish this is shown in Fig.10.8. The program uses a template to define the
structure of the book. Note that the date of publication, a member of record structure, is also
defined as a structure.
When the title and author of a book are specified, the program searches for the book in the list
using the function
look_up(table,…
arrow_forward
Answer true or false
arrow_forward
USC (PAG) Personal Academic Guide ™ is your personal electronic sequence sheet. This is a simple application to keep track of each course you are doing/have done, serve as a personal exam timetable for the course which have final exams, keep track of your projects for courses with projects and keep a record of grades earned. It should also allow you to write notes for each course you have done. The concept is like a check sheet system blended with a simple exam timetable.
Create a Class Diagram of at least six (6) major entities for your application. For entities with a large number of attributes you are allowed to limit your attributes to a max of six (6). All operations within each class should be identified by their visibility
arrow_forward
Overview:A Sports Club is an organization formed in order to help its members develop interest in certainsports.Usually, members interested in the same sport are divided into groups and an expert trainer isresponsible for training each group.In this TMA, it is required to help the head of a Sports Club for kids implement application tokeep track of the kids (members of the club) and the sports they are interested in.Requirements:After a quick meeting with the head of the sports club, you got the following information:• It is required to store the whole data (all groups of all sports) in one collection.* Each group has a number, a trainer and they are interested in a certain sport (e.g. football).In addition, it contains many kids with flexibility ofadding and removing kids within a givenlimit for the maximum number of kids who could be in the same group (where this limit isfixed and unified for all groups). Furthermore, there are other attributes (add at least 2attributes from your…
arrow_forward
Overview:A Sports Club is an organization formed in order to help its members develop interest in certainsports.Usually, members interested in the same sport are divided into groups and an expert trainer isresponsible for training each group.In this TMA, it is required to help the head of a Sports Club for kids implement application tokeep track of the kids (members of the club) and the sports they are interested in.Requirements:After a quick meeting with the head of the sports club, you got the following information:• It is required to store the whole data (all groups of all sports) in one collection.* Each group has a number, a trainer and they are interested in a certain sport (e.g. football).In addition, it contains many kids with flexibility ofadding and removing kids within a givenlimit for the maximum number of kids who could be in the same group (where this limit isfixed and unified for all groups). Furthermore, there are other attributes (add at least 2attributes from your…
arrow_forward
Overview:A Sports Club is an organization formed in order to help its members develop interest in certainsports.Usually, members interested in the same sport are divided into groups and an expert trainer isresponsible for training each group.In this TMA, it is required to help the head of a Sports Club for kids implement application tokeep track of the kids (members of the club) and the sports they are interested in.Requirements:After a quick meeting with the head of the sports club, you got the following information: It is required to store the whole data (all groups of all sports) in one collection. Each group has a number, a trainer and they are interested in a certain sport (e.g. football).In addition, it contains many kids with flexibility of adding and removing kids within a givenlimit for the maximum number of kids who could be in the same group (where this limit isfixed and unified for all groups). Furthermore, there are other attributes (add at least 2attributes from your…
arrow_forward
Critical section.
arrow_forward
USC (PAG) Personal Academic Guide ™ is your personal electronic sequence sheet. This is a simple application to keep track of each course you are doing/have done, serve as a personal exam timetable for the course which have final exams, keep track of your projects for courses with projects and keep a record of grades earned. It should also allow you to write notes for each course you have done. The concept is like a check sheet system blended with a simple exam timetable.
Use the UML Class diagram below to:
Create the appropriate sequence diagrams to model at least three (3) areas of your application.
arrow_forward
Instruction: Identify if the following is UNIQUE IDENTIFIER or NOT.
Plan ID
Workout ID
arrow_forward
PROGRAMMING LANGUAGE: C++ALSO PASTE SCREENSHOTS OF OUTPUTS
You are required to create a simulation of an elevator system. There are 7 floors in a building. A user may enter the elevator and press the button of the destined floor. The simulation should display appropriate messages while moving towards the destined floor.
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Related Questions
- excel Task Instructions In the Column chart, switch the data shown In the rows and columns.arrow_forwardEmployee view attendance report The employee must be logged in to the system to perform this function. The employee selects the report period (range of dates: from - to). The employee selects "show report". Range of dates for the report must be maximum 3 months, so if the range is invalid, the system displays an error message. The system displays every working day in the report with the status of the employee in this day, which could be one of the following: on time, late, did not come. One actor? One use case name? One class ? Attributes for the class ? One relation between classes ?arrow_forwardDescription Instructions This test has a time limit of 30 minutes. This test will save and submit automa Warnings appear when half the time, 5 minutes, 1 minute, and 30 second Timed Test Multiple Attempts Not allowed. This test can only be taken once. Force Completion This test can be saved and resumed at any point until time has expired. The Remaining Time: 16 minutes, 43 seconds. * Question Completion Status: A Moving to another question will save this response. Quèstion 9 The while statement will execute the loop body if the condition evaluates to false or zero. O True False A Moving to another question will save this response. 14 10 144 24 4. 3. % & 5 or 01 RI 7. LLIarrow_forward
- Solar position calculatorDevelop a program or spreadsheet to calculate:The position of the Sun on the celestial vault (zenith and azimuthal angle).The solar hourTime of solar noonTime of sunrise and sunsetDeclinationThe input data are: date, standard time, location and time zone.arrow_forwardExcelarrow_forwardThere are two options for ending tasks and preventing deadlocks:arrow_forward
- Booking Flight Ticket Via Online case study: “It is an electronic record of the traveller’s airline reservation, containing information such as the time, date and place of the flight, airport and seat.” Draw use case diagrams for booking flight tickets. 2. Draw activity diagrams for booking flight tickets.arrow_forwardA procedure that is defined by the user is called aarrow_forward* Question Completion Status: Moving to another question will save this response. Quèstion 5 Simplified form of F=y +x y+y xz is xy + y + x Z xy + y (1 + y z) xy +y (x+y z) xy +y +xz A Moving to another question will save this response.arrow_forward
- Geographical Information System (Design Geodatabase) An Environmental Protection Agency is planning to simulate flood caused by a dam breach. When the dam breach occurs, the water will spill to the river below, and flood will spread to the area along the riverbanks. This flood can be simulated based on the land elevation and land cover types. The agency would like to estimate the number of houses that will get an impact from the flood, and the road network for evacuation plan. You are required to design a geodatabase that will provide necessary information for the agency. Question: a. Determine attributes for each dataset. b. Apply some topological rules for your datasets.arrow_forwardGeographical Information System (Design Geodatabase) An Environmental Protection Agency is planning to simulate flood caused by a dam breach. When the dam breach occurs, the water will spill to the river below, and flood will spread to the area along the riverbanks. This flood can be simulated based on the land elevation and land cover types. The agency would like to estimate the number of houses that will get an impact from the flood, and the road network for evacuation plan. You are required to design a geodatabase that will provide necessary information for the agency. Question: a. Identify data themes that need to be included in the map.b. Determine data models to represent each theme.c. Determine types of datasets in a geodatabase for each data model.d. Determine attributes for each dataset.arrow_forwardBook Shop Inventory A book shop uses a personal computer to maintain the inventory of books that are being sold at the shop. The list includes details such as author, title, price, publisher, stock position, etc. Whenever a customer wants a book, the shopkeeper inputs the title and author of the book and the system replies whether it is in the list or not. If it is not, an appropriate message is displayed. If book is in the list, then the system displays the book details and asks for number of copies. If the requested copies are available, the total cost of the books is displayed; otherwise the message "Required copies not in stock" is displayed. A program to accomplish this is shown in Fig.10.8. The program uses a template to define the structure of the book. Note that the date of publication, a member of record structure, is also defined as a structure. When the title and author of a book are specified, the program searches for the book in the list using the function look_up(table,…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningCOMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE L
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage