Accounting
Anthropology
Archaeology
Art History
Banking
Biology & Life Science
Business
Business Communication
Business Development
Business Ethics
Business Law
Chemistry
Communication
Computer Science
Counseling
Criminal Law
Curriculum & Instruction
Design
Earth Science
Economic
Education
Engineering
Finance
History & Theory
Humanities
Human Resource
International Business
Investments & Securities
Journalism
Law
Management
Marketing
Medicine
Medicine & Health Science
Nursing
Philosophy
Physic
Psychology
Real Estate
Science
Social Science
Sociology
Special Education
Speech
Visual Arts
Computer Science
Q:
Which statement is false?
a) Pseudocode is an artificial and informal language that helps you develop algorithms.
b) Pseudocode is similar to everyday English.
c) Pseudocode is an actual programming language.
d) Pseudocode programs are not actually executed on computers.
Q:
Pseudocode does not typically include __________.
(a) definitions
(b) input/output
(c) action statements
(d) control statements
Q:
Which of the following is true of pseudocode programs?
(a) they are executed by the computer
(b) they help the programmer "think out" a program
(c) they typically include definitions and all types of statements
(d) all of the above are false
Q:
. The two key attributes of an algorithm are:
a) actions and start activity
b) flow and order of flow
c) actions and order of actions
d) flow and start activity
Q:
Specifying the order in which statements are to be executed in a computer program is called
(a) an algorithm
(b) transfer of control
(c) program control
(d) pseudocode
Q:
Which of the following statements should be used in secure C programming to display the string "Welcome" not followed by a newline character?
(a) printf( "Welcome" );
(b) puts( "Welcome" );
(c) printf( "%s", "Welcome" );
(d) None of the above.
Q:
Which of the following statements is true in secure C programming?
(a) You should avoid using printf to display a single string argument.
(b) You should always use printf to display a single string argument.
(c) You should always use puts to display a single string argument.
(d) None of the above.
Q:
The order in which statements are __________ is called flow of control.
a) entered in a source file
b) preprocessed
c) compiled
d) executed
Q:
Which statement is false?
a) The assignment operator associates from left to right.
b) The arithmetic operators associate from left to right.
c) The equality operators associate from left to right.
d) The relational operators associate from left to right.
Q:
Which of the following is not a keyword?
a) int
b) return
c) if
d) main
Q:
Which statement is false?
a) It is not correct to split an identifier with a space, a tab or a newline.
b) Statements and comments may be split over several lines.
c) The equals sign (=) is not an operator.
d) A good programming practice is to break a line after a comma in a lengthy comma-separated list.
Q:
Which statement is false?
a) Whitespace characters such as tabs, newlines and spaces are generally ignored by the C compiler.
b) The statements in an if statement must be indented.
c) Placing a blank line before and after every control structure can improve program readability.
d) There can be (but should not be) more than one statement per line.
Q:
Which statement is false?
a) Executable C statements either perform actions or make decisions.
b) If the condition in an if statement is met, the statement in the body of the if statement is executed.
c) All the relational operators have the same level of precedence.
d) The equality operators have a higher level of precedence than the relational operators.
Q:
Which of the following is an equality operator?
(a) ==
(b) =
(c) >
(d) >=
Q:
C's if statement executes the statement inside its body if a specified __________ is __________.
(a) condition, true
(b) condition, false
(c) equality operator, true
(d) relational operator, true
Q:
Which expression is true?
a) The expression a * (b + c) + c * (d + e) contains nested parentheses.
b) The expression y = a * x * x + b * x + cdoes exponentiation without an exponentiation operator.
c) The C standard library provides function power to perform exponentiation.
d) When we say evaluation of an expression proceeds from left to right we are referring to the additivity of the operators.
Q:
Which statement about precedence is false?
a) Parentheses may be used to force the order of evaluation to occur in any sequence desired by the programmer.
b) Nested, or embedded parentheses are evaluated last.
c) Multiplication has a higher precedence than addition.
d) Subtraction has a lower precedence than division.
Q:
a * ( b + c ) may also be written in C as
a) ab + ac
b) (a * b ) + c
c) a * b + c
d) a * b + a * c
Q:
Which statement about C arithmetic is false?
a) 6 / 3 yields 2
b) 5 / 2 yields 2.
c) 7 % 3 yields 1
d) 6 % 3 yields 0
Q:
Which statement is false?
a) In algebra, we write ab to multiply a times b.
b) In C, we write ab to multiply a times b.
c) In C, the remainder operator is %.
d) In C, integer division yields an integer result.
Q:
Evaluate the expression
3 * 4 % 6 + 4 * 5
(a) 20
(b) 26
(c) 12
(d) 32
Q:
Which operation will find the remainder when 15 is divided by 6?
(a) 15 / 6
(b) 15 % 6
(c) 15 ^ 6
(d) 15 * 6
Q:
Which of the following is false?
a) Reading a value into a memory location destroys the previous value.
b) Reading a value out of a memory location destroys that value.
c) sum = integer1 + integer2; involves destructive read-in.
d) The statement in part c) also involves nondestructive read-out.
Q:
Every variable has all the attributes below, except
a) name
b) value
c) alias
d) type
Q:
When a number gets assigned to a variable that already has a value __________.
(a) the new number overwrites the previous value at that memory location
(b) the new number gets assigned to a neighboring memory location
(c) the computer issues an error
(d) the new value is destroyed and the old value remains
Q:
Variable names actually correspond to __________.
(a) locations in the computer's memory
(b) operators
(c) integers
(d) data types
Q:
Which of the following is false?
a) Each variable being input in a scanf statement is generally preceded by an &.
b) Each variable being output in a printf statement is generally not preceded by an &.
c) In a printf statement, the comma that separates the format control string from the expressions to be printed is placed inside the format control string.
d) Calculations can be performed inside printf statements.
Q:
Which statement is false?
a) in the statement
sum = integer1 + integer2;
both = and + are binary operators.
b) The statement in part a) is an example of an assignment statement.
c) The spaces around each of the binary operators in the statement of part a) are required.
d) In part a), the = operator's two operands are sum and the value of the expression integer1 + integer2.
Q:
The address operator is
a) &&
b) %
c) @
d) &
Q:
Which of the following multiple word variable names does not conform to the good programming practices in the text?
a) multiple_word_variable_name
b) multipleWordVariableName
c) multiplewordvariablename
d) aReallyReallyLongMultipleWordVa
Q:
Which of the following statements is false?
a) C is case sensitive.
b) Uppercase and lowercase letters are different in C.
c) identifier and IdEnTiFiEr are identical identifiers in C.
d) Identifiers can be of any length
Q:
Which of these is not a valid identifier?
a) a_valid_identifier
b) a1_valid_identifier
c) a_valid_identifier_
d) 1_valid_identifier
Q:
Which statement is false.
a) Variables may be defined anywhere in the body of main.
b) All variables must be defined before they are used.
c) All variable definitions must include the name and data type of each variable.
d) Several variables of the same data type may be defined in one definition.
Q:
A(n) __________ is a location in the computer's memory where a value can be stored for use by a program.
a) unknown
b) name
c) variable
d) declaration
Q:
The __________ sign is also known as the __________ operator.
(a) +, assignment
(b) =, assignment
(c) *, stream manipulator
(d) &, stream insertion
Q:
Which statement prints "hi" on the screen?
(a) puts("hi");
(b) put "hi";
(c) puts "hi";
(d) none of the above
Q:
Which of the following is an invalid identifier (variable name)?
(a) _Test
(b) TEST
(c) 5test
(d) test1
Q:
Which of the following is not a valid integer value?
(a) -3
(b) 0
(c) 2134859
(d) 1.1
Q:
Q:
A linked program is often called a(n) __________.
a) chain
b) library
c) object
d) executable
Q:
Q:
The following line is most properly an example of a __________.
puts( "Welcome to C!" );
a) function
b) block
c) statement
d) header
Q:
Which of the following is not a synonym for a C string?
a) message
b) character string
c) character
d) literal
Q:
The pair of braces that delineate the body of main and the portion of the program between these braces is called a __________.
a) function
b) block
c) statement
d) header
Q:
In the line
int main()
the parentheses indicate that main is a program building block called a
a) module
b) statement
c) directive
d) function
Q:
Which of the following statements about the inclusion of <stdio.h> is false?
a) It is required.
b) This header file contains information and declarations used by the compiler when compiling standard input/output library functions such as printf.
c) This header file contains information that helps the compiler determine if calls to library functions have been made correctly.
d) This header helps locate bugs in your program at compile time, rather than at execution time (when errors are usually more costly to correct).
Q:
Lines beginning with a # are processed
a) at execution time.
b) at compile time.
c) at preprocessor time.
d) at postprocessor time.
Q:
Which statement about comments is false?
a) Comments begin and end with /* and */, respectively.
b) Programmers insert comments to document programs and improve program readability.
c) Comments do not cause any machine language object code to be generated.
d) Lengthy comments can cause poor execution-time performance.
Q:
Q:
Every statement in C must end with a
(a) period (.)
(b) semicolon (;)
(c) colon (:)
(d) backslash (/)
Q:
Which of the following must every C program have?
(a) main
(b) #include
(c) /*
(d) <stdio.h>
Q:
Which software product release category is "generally feature complete and supposedly bug free, and ready for use by the community?"
(a) Alpha.
(b) Beta.
(c) Release candidate.
(d) Continuous beta.
Q:
________ involves reworking programs to make them clearer and easier to maintain while preserving their correctness and functionality.
(a) Object-oriented programming
(b) Refactoring
(c) Agile software development
(d) LAMP
Q:
The World Wide Web ________.
(a) was developed at roughly the same time as the Internet
(b) paved the way for the Internet
(c) was developed years after the Internet
(d) was designed for "stand-alone" computers
Q:
What is bandwidth?
(a) information carrying capacity
(b) response time
(c) the set of networking protocols
(d) an error-control technique
Q:
An ancestor of today's Internet was _____________.
(a) ARPAnet
(b) e-mail
(c) PHP
(d) TCP/IP
Q:
Which of the following is not a key organization in the open-source community?
(a) Apache.
(b) SourceForge.
(c) Firefox.
(d) Eclipse.
Q:
Which of the following statements is false?
(a) The concepts of icons, menus and windows were originally developed by Xerox PARC.
(b) Windows is an open source operating system.
(c) The software that contains the core components of the operating system is called the kernel.
(d) Linux source code is available to the public for examination and modification.
Q:
The linker creates __________.
(a) an executable image
(b) a preprocessor directive
(c) object code
(d) an input stream
Q:
The compile stage is when ____________.
(a) the object code is linked with code for functions in other files
(b) the C program is translated into machine language code
(c) the program is executed one instruction at a time
(d) the program is placed in memory
Q:
Which statement is false?
(a) Classes are reusable software components.
(b) A class is to an object as a blueprint is to a house.
(c) Performing a task in a program requires a method.
(d) A class is an instance of its object.
Q:
________ models software in terms similar to those that people use to describe real-world objects.
(a) Method-oriented programming
(b) Object-oriented design
(c) Procedural programming
(d) None of the above
Q:
Which of the following is not an advantage of object-oriented programming?
(a) Software is more reusable.
(b) Software is more understandable, correct and modify.
(c) Using a modular, object-oriented design-and-implementation approach can make software-development groups much more productive.
(d) None of the abovethese are all advantages of object-oriented programming.
Q:
Java was developed by ___________.
(a) Sun Microsystems
(b) Bell Labs
(c) IBM
(d) ANSI/ISO
Q:
Which language was developed by Microsoft for integrating the Internet and the web into computer applications?
(a) Objective-C.
(b) Java.
(c) PHP.
(d) Visual C#.
Q:
C++ was developed by ________.
(a) Bjarne Stroustrup
(b) Ada Lovelace
(c) Blaise Pascal
(d) Ken Thompson
Q:
________ are essentially reusable software components that model items in the real world.
(a) objects
(b) supersets
(c) modules
(d) developers
Q:
Using standard library functions can be more efficient because __________.
(a) they save programming time
(b) they are carefully written to perform optimally
(c) they increase program portability
(d) all of the above.
Q:
When programming in C you"ll typically use all of the following building blocks except __________.
(a) functions from the standard library
(b) functions you create yourself
(c) functions other people have created for you
(d) functions provided by ANSI / ISO
Q:
Which of the following languages was an ancestor of C?
(a) A
(b) A+
(c) B
(d) B+
Q:
Programs that directly execute high-level language programs without compiling are called __________.
(a) assemblers
(b) interpreters
(c) compilers
(d) translators
Q:
Assemblers__________.
(a) convert machine language into high-level language.
(b) convert assembly language into machine language.
(c) convert high-level language into machine language.
(d) convert high-level language into assembler language.
Q:
A computer can directly understand only its own ___________.
(a) machine language
(b) assembly language
(c) high-level language
(d) none of the above
Q:
Which of the following statements is true?
(a) Interpreted programs run faster than compiled programs.
(b) Compilers translate high-level language programs into machine language programs.
(c) Interpreter programs typically use machine language as input.
(d) None of the above.
Q:
Which of the following is not one of the three general types of computer languages?
(a) Machine languages.
(b) Assembly languages.
(c) High-Level languages.
(d) Spoken languages.
Q:
A ________ is an electronic collection of data that's organized for easy access and manipulation.
(a) field
(b) database
(c) record
(d) file
Q:
A ________ is a group of characters or bytes that conveys meaning.
(a) database
(b) record
(c) character set
(d) field
Q:
The smallest data item in a computer, called a ________, can assume the value 0 or the value 1
(a) bit
(b) character
(c) field
(d) digit
Q:
Programs or data not actively being used by the other units are placed on the __________.
(a) output unit.
(b) memory unit.
(c) secondary storage unit.
(d) central processing unit.
Q:
Which of the following is not one of the six logical units of a computer?
(a) input unit
(b) programmer unit
(c) memory unit
(d) output unit