COP 45079

subject Type Homework Help
subject Pages 9
subject Words 1307
subject Authors Harvey Deitel, Paul J. Deitel

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
Computer programs are __________.
(a) sequences of instructions
(b) the information processed by the computer
(c) the various devices (disks, memory, keyboard) that comprise a computer system
(d) the people programming the computers
Which integer conversion specifier would display the hexadecimal digit A?
a) h
b) H
c) x
d) X
What does the 4 signify in the follwing statement?
printf( "%4i\n", 123 );
(a) degree of exponentiation
(b) floating point precision
page-pf2
(c) a field width
(d) none of these
Which of the following does not necessarily append the null character to its result?
(a) strcpy
(b) strncpy
(c) strcat
(d) strncat
Which of the following is not a whitespace character?
a) '\n'
b) '\f'
c) '\r'
d) '\w'
page-pf3
Which of the following statements is false?
(a) In general, as you study any programming language, if the language specification
says that doing something can lead to undefined behavior, avoid doing it to prevent
security vulnerabilities.
(b) The C standard specifies the exact behavior for every case in which incorrect
library-function arguments are passed to a library function.
(c) Undefined behaviors can occur when using printf with improperly formed
conversion specifications.
(d)None of the above.
Which statement is true?
a) Often, typedef is used to create synonyms for the basic data types.
b) Keyword typedef is used to create antonyms (or opposites) for the basic data types.
c) Names for structure types are typically defined with typedef to create longer type
names.
d) The first letter of each typedef name must be capitalized.
page-pf4
C++ was developed by ________.
(a) Bjarne Stroustrup
(b) Ada Lovelace
(c) Blaise Pascal
(d) Ken Thompson
Which is correct?
a) Use the size operator to determine the size of a structure.
b) Use the struct size operator to determine the size of a structure.
c) Use the sizeof operator to determine the size of a structure.
d) Determine the size of a structure manually by carefully adding up the sizes of the
members.
page-pf5
The forcing of arguments to the appropriate types is commonly called __________.
a) conversion
b) casting
c) coercion
d) transmogrification
If grade has the value of 60 what will the following code print?
if (grade >= 60) {
puts("Passed");
}
(a) nothing
(b) 60
(c) Passed
(d) puts("Passed");
Which of the following statements is true?
page-pf6
(a) A counter variable that stores only non-negative numbers should be declared as an
unsigned integral type.
(b) A counter variables that stores only non-negative numbers should be declared as a
signed integral type.
(c) The type of a counter does not matter
(d)None of the above.
A string in C is __________.
a) an array of characters ending in the empty string
b) a sequence of characters contained within single quotes
c) a sequence of characters preceded by a length field
d) an array of characters ending in the null character
Which of the following is true?
(a) Unions may be compared using the == operator.
(b) The address operator (&) cannot be used to take the address of a union.
page-pf7
(c) Unions may only contain two data types.
(d) Only one union member, and thus one data type, can be referenced at a time
Which statement is true?
a) C imposes no structure on a file.
b) C imposes record structure on a file.
c) C imposes sequential access on a file.
d) C imposes hierarchical access on a file.
Which statement about the memory functions of the string handling library is false?
a) The functions treat blocks of memory as strings.
b) The functions facilitate manipulating, comparing and searching blocks of memory.
c) The pointer parameters to these functions are defined void *.
d) A void * pointer cannot be dereferenced.
page-pf8
Which statement about "commenting out" code is false?
a) During program development, programmers often find it helpful to "comment out"
portions of code to prevent it from being compiled.
b) Code may not always be "commented out" correctly simply by enclosing that code in
the C comment delimiters /* and */.
c) The following preprocessor code effectively comments out code
#if 0
code prevented from compiling
#endif
d) The following preprocessor code effectively comments out code
#if 1
code prevented from compiling
#endif
Which function does not use either the standard input stream or the standard output
stream?
a) puts
b) getchar
c) gettime
d) scanf
page-pf9
A pragma not recognized by the implementation
a) causes the compilation to terminate.
b) prints an error message and causes the compilation to terminate.
c) prints an error message and allows the complation to continue.
d) is ignored.
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.
page-pfa
A printf format control string must be enclosed in
a) slashes
b) /* */
c) single quotes
d) double quotes
The empty statement is represented by placing __________ where a statement would
normally be.
a) empty
b) ;
c) null
d) :
strtok does not
page-pfb
(a) replace each delimiting character with '\0'
(b) return a pointer to the token it creates
(c) tokenize the entire a string when it's called
(d) modify the input string
When the __________ of a variable is passed to a function, the indirection operator (*)
may be used in the function to modify the __________ at that location in the caller's
memory.
a) address, address
b) value, address
c) value, value
d) address, value
________ are essentially reusable software components that model items in the real
world.
(a) objects
(b) supersets
page-pfc
(c) modules
(d) developers
________ 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
Which statement is not true for binary trees.
a) The left child in the root node is the first node in the left subtree.
b) The children of a node are called siblings.
c) A node with no children is called an orphan.
d) The root node is the first node in the tree.
page-pfd
Which operation will find the remainder when 15 is divided by 6?
(a) 15 / 6
(b) 15 % 6
(c) 15 ^ 6
(d) 15 * 6
Q1: Which forms of inheritance are is-a relationships?
a. All forms of inheritance are is-a relationships.
b. Only public and private.
c. Only public and protected.
d. Only public.
page-pfe
. A structure containing a member that's a pointer to the same structure type is referred
to as a __________ structure.
a) self-referential
b) self-describing
c) self-recursive
d) self- elemental

Trusted by Thousands of
Students

Here are what students say about us.

Copyright ©2022 All rights reserved. | CoursePaper is not sponsored or endorsed by any college or university.