All Matches
Solution Library
Expert Answer
Textbooks
Search Textbook questions, tutors and Books
Oops, something went wrong!
Change your search query and then try again
Toggle navigation
FREE Trial
S
Books
FREE
Tutors
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Hire a Tutor
AI Tutor
New
Search
Search
Sign In
Register
study help
computer science
prelude to programming
Questions and Answers of
Prelude to Programming
The contents of comments are ignored by the computer while running a program.True of False
A program’s welcome message consists of a series of comments.True of False
A logic error is a violation of the programming language’s rules for creating valid statements.True of False
Before we code a program, we should design it.True of False
Which of the following is not a principle of good programming style?a. Use descriptive variable namesb. Provide a welcome messagec. Identify, using text, the numbers that are outputd. Test the program
Which of the following is not a basic control structure?a. The process structureb. The loop structurec. The decision structured. The sequential structure
The flowchart symbol shown at the right is a(n)a. Process symbolb. Input/output symbolc. Decision symbold. Terminator symbol
The flowchart symbol shown at the right is a(n)a. Process symbolb. Input/output symbolc. Decision symbold. Terminator symbol
The flowchart symbol shown at the right is a(n)a. Process symbolb. Input/output symbolc. Decision symbold. Terminator symbol
Which of the following is not a principle of structured programming?a. Design the program in a modular fashionb. Write each program module as a series of control structuresc. Code the program so that
The main module of a program contains the following statements:Call ModuleACall ModuleBCall ModuleCWhich of the following statements is executed after all statements in ModuleB have been carried
The main module of a program contains the following statements:Call ModuleACall ModuleBCall ModuleCWhich of the following statements is executed after Call ModuleB ?a. Call ModuleAb. Call ModuleCc.
Which of the following is not a benefit of modular programming?a. It increases program readabilityb. It increases programmer productivityc. It allows for the creation of a “library” of common
Which of the following is not necessarily a characteristic of a program module?a. It performs a single taskb. It contains several submodulesc. It is self-containedd. It is relatively small in size
The type of external documentation that is written mainly for the benefit of programmers is a(n) _______________.
The two types of testing done on commercial software are __________ testing and __________ testing.
A(n) ____________ error results from statements that do not properly perform their intended task.
A(n) ____________ error is a violation of a programming language’s rules for the structure of statements.
A(n) ____________ comment provides an explanation of a portion of code.
A(n) ____________ comment provides a general description of a program or program module.
____________ makes use of short, English-like phrases to describe the design of a program.
A(n) ____________ is a pictorial representation of a program’s modules and the relationships among them.
Kim wants to buy a car. Help Kim compute the monthly payment on a loan, given the loan amount, the annual percentage rate of interest, and the number of monthly payments. The program should allow Kim
To ____________ a module (or subprogram) into action means to cause execution to transfer to that module.
Shannon and Jasmine bowl as a team. Each of them bowls three games in a tournament. They would like to know their individual averages for their three games and the team average. Allow the user to
The ____________ is the generic name for the module in which program execution begins.
The owners of the Super Supermarket would like to have a program that computes the monthly gross pay of their employees as well as the employee’s net pay. The input for this program is an employee
When analyzing a problem, we usually start by identifying the results we want the program to produce; that is, the program’s ____________.
The manager of the Super Supermarket would like to be able to compute the unit price for products sold there. To do this, the program should input the name and price of an item per pound and its
The process of solving a problem by analyzing it, designing an appropriate program, coding the design, and testing the code is known as the ____________.
Prompt for and input a saleswoman’s sales for the month (in dollars) and her commission rate (as a percentage). Output her commission for that month. Note that you will need to convert the
Given the following single-precision floating point binary number:a. Convert the number to hexadecimal notationb. Convert the number to decimal 10000110 11110010100000000000000
Normalize the following binary number: 11110011.01102.
Normalize the following binary number: 10101010.11012.
Represent the following numbers in Excess_127:a. +12110b. −12110
Represent the following numbers in Excess_127:a. +910b. −410
Represent the following decimal numbers as floating point binary numbers. Take each fractional part out to to 4 bits.a. 1248.687510b. 94.0312510
Represent the following decimal numbers as floating point binary numbers. Take each fractional part out to to 4 bits.a. 32.37510b. 543.02510
Convert the following decimal fractions to 6-bit binary numbers:a. 3/1610b. 8/910
Convert the following decimal fractions to 4-bit binary numbers:a. 0.687510b. 0.062510
Find the two’s complement of the following decimal integers using an 8-bit memory location or indicate if an overflow condition occurs:a. +5210b. −5910
Find the two’s complement of the following decimal integers using an 8-bit memory location or indicate if an overflow condition occurs:a. +2310b. −2310
Convert the following decimal integers to 8-bit sign-and-magnitude binary integers or indicate if an overflow condition occurs:a. −11210b. +34210
Convert the following decimal integers to 8-bit sign-and-magnitude binary integers or indicate if an overflow condition occurs:a. +3410b. −3910
Convert the following decimal integers to 8-bit unsigned binary integers or indicate if an overflow condition occurs:a. 12910b. 30410
Convert the following decimal integers to 8-bit unsigned binary integers or indicate if an overflow condition occurs:a. 1010b. 4310
What binary number immediately follows the following:a. 101012b. 101111002
What hexadecimal number immediately precedes the following:a. E916b. 20016
What is wrong with the following binary number: 0110011201102.
Convert the following binary numbers to easily readable hexadecimal notation (i.e., convert each four binary digits to a hexadecimal digit):a. 1010101010102b. 000011111100110101102
Convert the value of the following binary numbers to hexadecimal notation:a. 11012b. 111011102
Write the hexdecimal representation of the following decimal numbers:a. 30310b. 411110
Write the hexadecimal representation of the following decimal numbers:a. 1210b. 16010
Write the decimal value of the following hexadecimal numbers:a. 23416b. 112D16
Write the decimal value of the following hexadecimal numbers:a. 6416b. 9F16
Write the decimal value of the following binary numbers:a. 1010102b. 10000112
Write the decimal value of the following binary numbers:a. 112b. 10112
Write the binary representation of the following:a. 1410b. 6210c. 98610d. 582410
Write the binary representation of the following:a. 710b. 3410c. 6310d. 15710
In sign-and-magnitude format, the leftmost bit is saved for the sign where 1 indicated a negative number and 0 indicates a positive number.True or False
To convert a negative integer to binary using one’s complement format, you convert the integer to binary and “flip” all the digits.True or False
A number system that uses 7 as a base would be impossible to devise since only even numbers can be used as bases.True or False
The smallest unsigned integer that can be represented in a 16-bit memory location is 02.True or False
To store the binary number 1102 in an 8-bit location, simply add five zeros to get 110000002.True or False
The fraction ¾ when converted to binary and stored in a 4-bit location is represented as 0.00112.True or False
The biggest problem with using the two’s complement method to store signed integers is that the zero is represented in two ways.True or False
A double-precision floating point number has twice the range of a single-precision floating point number.True or False
To make it easier for a human to read a binary floating point number, the number may be converted to hexadecimal notation.True or False
In a storage location of 4 bits, a sign-and-magnitude integer could be any integer from 0 to 15, inclusive.True or False
In binary representation, 12 + 12 =a. 12b. 102c. 112d. Cannot be done
Which type of integer representation would have a range of 0 − 255?a. Unsignedb. Sign-and-magnitudec. One’s complementd. Two’s complement
Which of the following is the correct representation of −780,030,000 in exponential notation?a. −7.8003 × 108b. 7.8003E-8c. −7.8E+8d. −7.8003E+8
What is the smallest integer that can be represented in 8 bits in sign-and magnitude format?a. 0b. −255c. −127d. −128
What is the largest integer that can be represented in 4 bits in sign-and magnitude format?a. 7b. 15c. 8d. none of these
Which of the following is not an integer?a. 5b. −4c. 0d. 2.8
Imagine you are creating a new number system that uses 12 as the base. How many digits would be in your system?a. 11b. 12c. 13d. This cannot be done
What is the decimal value of the B in the hexadecimal number 3AB416?a. 1110b. 1610c. 17610d. 25610
Using exponents, the number 1/1000 is ____________.
To convert the number 8.396052 × 106 to regular notation, you multiply 8.396052 by ____________.
The two parts of a normalized number are the ____________ portion and the __________ portion.
A floating point number has a(n) ____________ part and a(n) ____________ part.
The smallest unsigned integer is ____________.
There are ____________ digits in the hexadecimal system.
Briefly describe the difference between a single-precision and a double precision floating point number. Then describe one possible scenario where double precision would be required.
There are ____________ digits in the decimal system.
When a base is raised to a power of ____________, the result is 1.
Given the decimal number −165910, convert the number to a 16-bit memory location in binary:a. Using two’s complementb. Using the formula (2x − |N|) where x is the number of bits and N is the
Given the number 75, ____________ is the exponent.
Convert the following decimal numbers to base 12, using X, Y, and Z for the extra digits:a. 2310b. 56310c. 2,83210
Given the number 108, ____________ is the base.
Convert the following decimal numbers to base 3:a. 510b. 910c. 12610
Write statements that declare the variables used in this program.Set Number1 = 4Set Number1 = Number1 + 1Set Number2 = 3Set Number2 = Number1 * Number2Write Number2
What are the possible data types for Number1 and Number2 in this program?Set Number1 = 4Set Number1 = Number1 + 1Set Number2 = 3Set Number2 = Number1 * Number2Write Number2
Suppose we want to precede the last statement in this program by a statement that displays the following message:The result of the computation is:Write such a statement.Set Number1 = 4Set Number1 =
Write a statement that supplies a suitable input prompt for the Input statements in Exercise 46.Set Number1 = 4Set Number1 = Number1 + 1Set Number2 = 3Set Number2 = Number1 * Number2Write Number2Data
Replace each of the first and third statements of this program by a statement that inputs a number from the user.Set Number1 = 4Set Number1 = Number1 + 1Set Number2 = 3Set Number2 = Number1 *
What number is displayed by this program?Set Number1 = 4Set Number1 = Number1 + 1Set Number2 = 3Set Number2 = Number1 * Number2Write Number2
What are the program’sa. Input statements?b. Assignment statements?c. Output statements?Set Number1 = 4Set Number1 = Number1 + 1Set Number2 = 3Set Number2 = Number1 * Number2Write Number2
List the variables in the program.Set Number1 = 4Set Number1 = Number1 + 1Set Number2 = 3Set Number2 = Number1 * Number2Write Number2
If Character1 and Character2 are single characters, is Character1 + Character2 also a single character?
Showing 400 - 500
of 587
1
2
3
4
5
6