CSCI-1101-05-Fall2021

Ace your homework & exams now with Quizwiz!

In base 16, the digit E corresponds to what decimal value? 1 10 12 14 15

14

Solve in hexadecimal ADF + DCA 18B9 18A9 1899

18A9

In which decade was the first generation of computers developed? 1930s 1940s 1950s 1960s 1970s

1950s

Which of the following is a value less than zero, with a sign opposite to its positive counterpart? number natural number integer negative number rational number

negative number

In the following statement, if (condition1) statement1 else if (condition2) statement2 ... ... else statementn the elses match with the closest if above them the elses match with the closest if below them the first else matches with the first if ( condition 1) none of the above

the elses match with the closest if above them

In the statement "while (fahr <= upper)" <= is the same as > ! > both 1 and 2 above none of the above

! >

The power corresponding to the least significant digit in the positional notation in any base is: 0 1 8 16 10

0

The statement for (fahr = 0; fahr <= 300; fahr = fahr + 20) printf("%3d %6.1f\n", fahr, (5.0/9.0)*(fahr-32)); will use fahr as a counter beginning at 0 300 20 none of the above

0

convert to 2's complement format. 1011 1010 2 0100 10102 0100 01002 0100 01102 None of the above

0100 0110 2

Convert the following to binary format. 125 10 0101 1101 0111 1101 0111 0101 none of the above

0111 1101

In the following statement, it will execute at least _______ times if the condition is false. while (fahr <= upper) { ... } 1 0 2 none of the above

1

Solve in binary 1101 1111 + 11 0101 1 0001 0100 1 0001 1100 1 0011 0100

1 0001 0100

do the following subtraction using 2's complement 11 0111 - 01 1111 Answers: 1 1000 1 1100 1 0110 none of the above

1 1000

Perform the following additin in binary 1101 1111 + 1010 0101 1 1000 0100 1000 0100 1 1000 1100 none of the above

1 1000 0100

Convert the following decimal into binary. 458 10 1 1100 1010 00 1100 1010 0001 1100 1010 1 and 3 above are correct none of the above

1 1100 1010

Solve in hexidecimal F894 + ABCD 1 A561 1 A461 1 B461 none of the above

1 A461

What is the 2's complement of 011 0111 0100? 100 1000 1100 100 1000 1011 011 0111 0000 100 1000 1111 none of the above

100 1000 1100

Solve in binary 1101 1111 - 011 0101 1110 1010 1010 1010 11010 1010 none of the above

1010 1010

What is the decimal value of the largest digit in the hexadecimal number system? 0 9 10 15 16

15

do the addition below ADEF + ADEF 15BDF 15BDE 5BDE 15CDE

15BDE

What is the largest decimal value you can represent with two hexadecimal digits? 256 127 128 255 511

255

In general, how many things can be represented by n bits? 2n + 1 n2 n4 2n

2n

What is the minimum number of bits needed to represent 6 things? 2 3 4 6 8

3

Perform the subtraction in hexidecimal format. EBA16 - AEF16 3CB16 3DB16 3CC16 None of the above

3CB16

An example of an int in int lower, upper, step; is 4 4.0 - 4.0

4

What is the minimum number of bits needed to represent 16 things? 2 3 4 8 1

4

The final result for fahr in the statements below will be fahr = 20 fahr = fahr + 20 40 20 60 none of the above

40

Subtract the below FAB16 - ADE16 4CD16 4DD16 4CC16 none of the above

4CD16

The following is an example of an integer. 5 5.7 - 5.2

5

What is the largest decimal value you can represent with six binary bits? 16 64 32 63 31

63

How many things can be represented using three bits? 3 4 6 8 12

8

convert the following to hexadecimal format. 1011 1110 10102 BEA16 BDA16 CEA16 none of the above

BEA16

Who designed the Difference Engine? Leibniz Pascal Babbage Lovelace Hollerith

Babbage

1101 2 = 12 10 True False

False

110111112 = DE16 True False

False

A sequence of characters in double quotes, like "hello, world\n", is called a character or integer constant. True False

False

A vacuum tube was a device used in the third generation of computers. True False

False

Charles Babbage is called the "father of computers" because he built the first computer. True False

False

Computers can actually add, subtract, multiply and divide. Answers: True False

False

Computers use hexadecimal digits to add, subtract, multiply and divide. True False

False

EDF16 = 1010 1101 1111 True False

False

Lady Lovelace programmed the first computer. True False

False

The abacus was the world's first electronic digital computer. True False

False

The base of the hexadecimal number system is 15. True False

False

The letter C is used to represent the number 11 in hexadecimal. True False

False

The sequence "\nL" in the string is C notation for the newline character, which when printed advances the output to the left margin on the next line. True False

False

The sequence "\nL" is C notation for the newline character, which when printed advances the output to the left margin on the next line. True False

False

The statements of a function are enclosed in brackets [ ]. True False

False

The value of each position in a number system is determined by subtracting the base from the position number. True False

False

int fahr, celsius; declares two variables which can contain data such as 4, 5.5 , and -7. True False

False

upper = 300; is a declaration where a variable is declared. True False

False

Who used punch cards to start a company that led to company IBM? Pascal Herman Hollerith Babbage Jacquard none of the above

Herman Hollerith

Who invented the punched card? Leibniz Pascal Babbage Lovelace Jacquard

Jacquard

Who built the first gear-driven mechanical calculator that did addition and subtraction? Leibniz Pascal Babbage Lovelace Hollerith

Pascal

"#include" tells the compiler to include information about the standard input/output library. True False

True

"int upper ;" is a declaration where a variable is declared. True False

True

"main ()" is defined to be a function. True False

True

A Bus is a Collection of wires used to transfer bit patterns between CPU and Main Memory True False

True

A byte is made up of eight binary digits. True False

True

A computer port is where data and enter or exit a computer. True False

True

A function contains statements that specify the computing operations to be done. True False

True

A function may or may not return a value to the part of the program that called it. True False

True

Ada Augusta, Countess of Lovelace, is credited with being the first programmer. True False

True

An algorithm is a set of steps that defines how a task is performed. True False

True

Array subscripts always start at zero in C. True False

True

Bits represent circuit states (on/off) in computers. True False

True

Every additional bit used doubles the number of things that can be represented by a binary string. True False

True

Herman Hollerith started the company known today as International Buisness Machines. True False

True

In c programs, a program begins executing at the beginning of main (). True False

True

In printf("hello, world\n"); printf is a function. True False

True

In the below , \n means a new line after displaying hello world. #include <studio.h> main() { printf ("hello, world\n"); } True False

True

In the below , main is a function. #include <studio.h> main() { printf ("hello, world\n"); } True False

True

In the following, "/* step size */", this is a comment. True False

True

In two's complement representation positive values are simply the "regular" binary. True False

True

Representing a number in base 5 sometimes requires more digits than representing that same number in base 10. True False

True

Starting from the right, every group of four binary digits can be read as one hexadecimal digit. True False

True

The Internet was developed to allow universities to exchange data for national defense purposes. True False

True

The base of a number system determines the number of digits used in the system. True False

True

The category of numbers called integers includes negative numbers. True False

True

The fourth generation of computer hardware was characterized by large-scale integration. True False

True

The function putchar prints a character each time it is called: True False

True

The function putchar prints a character each time it is called: putchar(c); prints the contents of the integer variable c as a character, usually on the screen. True False

True

The sequence \n in the string is C notation for the newline character, which when printed advances the output to the left margin on the next line. True False

True

The statement ++nc; presents a new operator, ++, which means increment by one before processing the value of nc first. True False

True

The statement nc++; presents a new operator, ++, which means increment by one after processing the value of nc first. True False

True

To find the decimal equivalent in a new base you just have to repeatedly divide the decimal value and its quotient by the new base. True False

True

Two hexadecimal digits can be stored in one byte. True False

True

Variables store values used during the computation. True False

True

float data type, which means floating point, i.e., are numbers that may have a fractional part. True False

True

in c = getchar(); the variable c contains the next character of input. True False

True

printf never supplies a newline character automatically True False

True

¡The Motherboard is the main circuit board of the machine True False

True

In the below when will the loop begin processing main() { int fahr; for (fahr = 0; fahr <= 300; fahr = fahr + 20) printf("%3d %6.1f\n", fahr, (5.0/9.0)*(fahr-32)); } before checking the condition after checking the condition when the condition is met none of the above

after checking the condition

The declaration int ndigit[10]; declares ndigit to be an array of 10 integers an integer an array of 9 elements none of the above

array of 10 integers

What is a single binary digit called? byte nibble bit word block

bit

In ndigit[0], the number inside of [ ] is called a/an ______________ subscript index both above none of the above

both above

A single letter ot symbol is called a __________ char int real number none of the above

char

The two lines /* print Fahrenheit-Celsius table for fahr = 0, 20, ..., 300 */ are a ______________, which in this case explains briefly what the program does. statement comment command none of the above

comment

The statement int fahr; is a declaration initialization assignment none of the above

declaration

A connector to a computer can be either female of male only parallel must be both male & female none of the above

either female of male

In the below what ends the loop main() { int fahr; for (fahr = 0; fahr <= 300; fahr = fahr + 20) printf("%3d %6.1f\n", fahr, (5.0/9.0)*(fahr-32)); } fahr = 0; fahr <= 300; fahr = fahr + 20 none of the above

fahr <= 300;

In the below what is the condition that is checked on each iteration main() { int fahr; for (fahr = 0; fahr <= 300; fahr = fahr + 20) printf("%3d %6.1f\n", fahr, (5.0/9.0)*(fahr-32)); } fahr = 0; fahr <= 300; fahr = fahr + 20 none of the above

fahr <= 300;

In the below what advances each iteration main() { int fahr; for (fahr = 0; fahr <= 300; fahr = fahr + 20) printf("%3d %6.1f\n", fahr, (5.0/9.0)*(fahr-32)); } fahr = 0; fahr <= 300; fahr = fahr + 20 none of the above

fahr = fahr + 20

In the below statement, what advances the statement so that it terminates eventually. fahr = lower; while (fahr <= upper) { celsius = 5 * (fahr-32) / 9; printf("%d\t%d\n", fahr, celsius); fahr = fahr + step; } fahr = fahr + step; fahr = lower; printf("%d\t%d\n", fahr, celsius); none of the above

fahr = fahr + step;

In the below, the else is matched with __________ main() { int c, nl, nw, nc, state; state = OUT; nl = nw = nc = 0; while ((c = getchar()) != EOF) { ++nc; if (c == '\n') ++nl; if (c == ' ' || c == '\n' || c = '\t') state = OUT; else if (state == OUT) { state = IN; ++nw; } } printf("%d %d %d\n", nl, nw, nc); } if (c == ' ' || c == '\n' || c = '\t') if (c == '\n') while ((c = getchar()) != EOF) none of the above

if (c == ' ' || c == '\n' || c = '\t')

In the below while (fahr <= upper) <= means less than or equal to less than and equal to greater than none of the above

less than or equal to

The below is called a _____________ fahr = lower; while (fahr <= upper) { celsius = 5 * (fahr-32) / 9; printf("%d\t%d\n", fahr, celsius); fahr = fahr + step; } function loop method none of the above

loop

All programms execute using the fetch, decode, execute called the ___________ machine cycle instruction cycle processor steps none of the above

machine cycle

An example of an assignment statement is rate = 4.50 int rate int rate, hours none of the above

rate = 4.50

The statment getchar(); is used to read a char from the keyboard read a string of characters from the keyboard read a char from the keyboard read a character from a file none of the above

read a string of characters from the keyboard

________ are Temporary holding place for data being manipulated by CPU (inputs to ALU, results produced by ALU registers ram bytes none of the above

registers

Fetch in the machine cycle means retrieve an instruction from ram into a register retrieve an instruction from a register into ram retrieve an instruction from a register into another register none of the above

retrieve an instruction from ram into a register

To which hardware generation does core memory belong? first second third fourth fifth

second

A bit represents state of a circuit 0 or 1 a letter of number none of the above

state of a circuit

In which hardware generation were integrated circuits introduced? first second third fourth fifth

third

What device replaced the vacuum tube in second generation computers? disk drive transistor magnetic drum terminal punch card

transistor


Related study sets

Positioning 2: Ch. 16 and a little of Ch. 17

View Set

character/plot/theme Arthurian legends

View Set

Kosakata bahasa arab As shalawatu

View Set

History Chapter 13? Homework Assignments

View Set

Geraldine Moore the Poet Reasons

View Set

EPSY 3300 TEST 2 REVIEW (summer 18)

View Set

Entrepreneurial Small Business 5th Edition; Chapter 9

View Set