C programming multiple choice Questions i just need the answers no explanations
ID: 3576628 • Letter: C
Question
C programming multiple choice Questions i just need the answers no explanations and a speedy response if possible
Which of the following restricts the scope of a global variable to the file it is defined in?
extern
static
int
local
Which of the following is a non-linear data structure?
linked list
queue
binary tree
stack
Which statement is false?
Function atof returns a double version of its argument.
If the converted value cannot be represented, the behavior of atoi is undefined.
When using functions from the general utilities library, its header file must be included.
Function strtol receives three arguments.
Which is not a common programming error with regard to the character and string conversion specifiers?
using %c to print a string
using %s to print a char argument
using double quotes around a character string
using double quotes around a character constant
When the computer compares two strings, it actually compares the ________ in the strings.
numbers of characters
numeric codes of the characters
numeric characters
lengths of the leading alphabetic portions
Which statement about scan sets is false?
A scan set is a set of characters enclosed in parentheses and preceded by a percent sign in the format control string.
A scan set scans the characters in the input stream looking only for those characters that match the characters contained in the scan set.
Each time a character in the input stream matches a character in the scan set, the input stream character is stored in the scan set's corresponding argument-a pointer to a character array.
The scan set stops inputting characters when a character that is not contained in the scan set is encountered.
Which character handling library function returns true if its argument is a printing character?
ispchar
isprintablechar
isprint
isprintchar
Which of the following statements about stacks is incorrect?
Stacks can be implemented using linked lists.
Stacks are first in, first-out (FIFO) data structures.
New nodes can only be added to the top of the stack.
The last node (the bottom) of a stack has a null (zero) link.
Function gets appends a ________ to its array target in memory.
leading null character
leading end-of-file character
terminating null character
terminating end-of-file character
Which symbolic constant must be defined to ignore all assert statements?
DEBUG
NDEBUG
NOASSERT
UNASSERT
Suppose you have a list of names sorted in alphabetical order, already stored in one of the data types below. The easiest way to print the names in reverse alphabetical order would be to use ________.
a binary search tree
a stack
a queue
a circular, singly linked list
________ are collections of related variables-sometimes referred to as aggregates-under one name.
Members
Enumerations
Structures
Files
Function strcspn returns ________.
a length
a range of characters
the starting and ending positions of a range of characters
a span
Which statement is false?
A pointer may be incremented or decremented.
An integer may be added to a pointer.
All operators normally used in arithmetic expressions, assignment expressions and comparison expressions are valid in conjunction with pointer variables.
A pointer may not be added to a pointer.
Which statement about the preprocessor is false?
It can perform conditional compilation of program code.
It can perform conditional execution of preprocessor directives.
All preprocessor directives begin with #.
All preprocessor directors must begin in column 1.
extern
static
Explanation / Answer
-> extern
-> binary tree
-> When using functions from the general utilities library, its header file must be included.
-> using double quotes around a character string
-> numeric codes of the characters
-> A scan set is a set of characters enclosed in parentheses and preceded by a percent sign in the format control string.
-> isprint
-> Stacks are first in, first-out (FIFO) data structures.
-> terminating null character
-> NDEBUG
-> a stack
-> Structures
-> a length
-> All operators normally used in arithmetic expressions, assignment expressions and comparison expressions are valid in conjunction with pointer variables.
-> All preprocessor directors must begin in column 1.
->
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.