Deck 14: Additional Capabilities
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/55
العب
ملء الشاشة (f)
Deck 14: Additional Capabilities
1
The typedef statement creates a new data type.
False
2
Using uppercase names in typedef statements is mandatory.
False
3
One of the differences between the a typedef statement and a #define statement is that typedef statements are processed directly by the compiler while #define statements are processed by the preprocessor.
True
4
Compiler processing of typedef statements allows for text replacements that are not possible with the preprocessor.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
5
The statement typedef int ARRAY[100]; is not valid in C.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
6
typedef statements cannot be used with structure definitions.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
7
Both the #ifndef and #ifdef directives permit conditional compilation in that the statements immediately following these directives, up to either the #else or #endif directives, are compiled only if the condition is true, whereas the statements following the #else are compiled only if the condition is false.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
8
The relationship between the #ifdef and #ifndef directives is that the expression #ifndef condition performs the same task as the expression #ifdef !condition.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
9
Sets of related integer values can be equated to an equivalent set of constants using an enumerated list.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
10
An enum statement can be replaced by several typedef statements.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
11
Integer values in an enumeration must be in sequence.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
12
An optional enumerated list name can be used in an enumeration statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
13
Enumerated constants can be any valid user-created identifier, but each name in the list must be unique.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
14
In an enumeration, it is not valid for two constants to be equated to the same integer value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
15
The conditional operator has a lower precedence than the assignment operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
16
Conditional expressions are only useful in replacing if-else statements when the expressions in the equivalent if-else statement are not long or complicated.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
17
A goto statement is never required because C's normal structures provide sufficient flexibility to handle all possible flow control requirements.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
18
When working with bit operations, inclusive ORing with a 1 has the same effect as ANDing with a 0.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
19
When the bit operators &, |, and ^ are used with operands of different sizes, the shorter operand is always increased in bit size to match the size of the larger operand.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
20
For positive signed numbers, where the leftmost bit is 0, both arithmetic and logical right shifts produce the same result.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
21
C places several restrictions on the equivalences that can be established with the #define statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
22
The advantage of using a macro such as #define SQUARE(x) x * x is that since the data type of the argument is not specified, the macro can be used with any data type argument.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
23
A better alternative to #define SQUARE(x) (x) * (x) is #define SQUARE(x) x * x.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
24
If necessary, a macro definition can be continued on a new line by typing a backslash character, \, before the Enter key is pressed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
25
The advantage of using a macro instead of a function is an increase in execution speed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
26
The full function header of a main() function that will receive command-line arguments is int main(int argc, char *argv[]).
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
27
Any argument typed on a command line is considered to be an integer.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
28
typedef can be used to create ____.
A)structures
B)variables
C)aliases
D)macros
A)structures
B)variables
C)aliases
D)macros
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
29
The statement ____ makes the name REAL a synonym for double.
A)typedef double REAL;
B)#define double REAL
C)enum REAL double
D)typedef REAL double;
A)typedef double REAL;
B)#define double REAL
C)enum REAL double
D)typedef REAL double;
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
30
The definition REAL val; is ____.
A)not valid in C
B)is equivalent to double val; if it comes after typedef double REAL;
C)will generate a compiler warning
D)defines a macro instance if it comes after #define REAL double
A)not valid in C
B)is equivalent to double val; if it comes after typedef double REAL;
C)will generate a compiler warning
D)defines a macro instance if it comes after #define REAL double
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
31
The equivalence produced by a typedef statement can frequently be produced equally well by a ____ statement.
A)enum
B)#define
C)struct
D)alias
A)enum
B)#define
C)struct
D)alias
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
32
ARRAY first, second; is equivalent to the two definitions int first[100]; and int second[100]; if ____.
A)you are using a pre-ANSI C compiler
B)you are using a C/C++ compiler
C)the statement typedef int ARRAY[100]; is used before
D)the statement #define ARRAY int[100]; is used before
A)you are using a pre-ANSI C compiler
B)you are using a C/C++ compiler
C)the statement typedef int ARRAY[100]; is used before
D)the statement #define ARRAY int[100]; is used before
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
33
The conditional preprocessor directive ____ means "if not defined".
A)#ifdef
B)#ifndef
C)#ifnotdef
D)#ifnotdefined
A)#ifdef
B)#ifndef
C)#ifnotdef
D)#ifnotdefined
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
34
The conditional preprocessor directive ____ means "if defined".
A)#ifdef
B)#ifndef
C)#ifdefined
D)#if_def
A)#ifdef
B)#ifndef
C)#ifdefined
D)#if_def
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
35
____ is the most frequently used conditional preprocessor directive.
A)#define
B)#else
C)#ifdef
D)#ifndef
A)#define
B)#else
C)#ifdef
D)#ifndef
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
36
Enumerated lists are identified by the reserved word ____ followed by an optional, user-selected name and a required list of one or more constants.
A)list
B)typedef
C)enumerate
D)enum
A)list
B)typedef
C)enumerate
D)enum
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
37
By default, the first enumerated name in an enumerated list has a value of ____.
A)-1
B)0
C)1
D)NULL
A)-1
B)0
C)1
D)NULL
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
38
Explicit values can be assigned to each enumerated constant, with unspecified values automatically continuing the integer sequence from the last specified value. For example, ____.
A)enum {Mon: 1, Tue, Wed, Thr, Fri, Sat, Sun};
B)enum {Mon, Tue, Wed, Thr, Fri, Sat, Sun};
Mon = 1;
C)enum {Mon = 1, Tue, Wed, Thr, Fri, Sat, Sun};
D)enum {Mon 1, Tue, Wed, Thr, Fri, Sat, Sun};
A)enum {Mon: 1, Tue, Wed, Thr, Fri, Sat, Sun};
B)enum {Mon, Tue, Wed, Thr, Fri, Sat, Sun};
Mon = 1;
C)enum {Mon = 1, Tue, Wed, Thr, Fri, Sat, Sun};
D)enum {Mon 1, Tue, Wed, Thr, Fri, Sat, Sun};
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
39
A conditional expression uses the conditional operator, ____, and provides an alternate way of expressing a simple if-else statement.
A)->
B)?:
C)?
D):
A)->
B)?:
C)?
D):
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
40
The operator ____ is a ternary operator.
A)?:
B)->
C)&
D)[]
A)?:
B)->
C)&
D)[]
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
41
The ____ statement provides an unconditional transfer of control to some other statement in a program.
A)jump
B)goto
C)label
D)transfer
A)jump
B)goto
C)label
D)transfer
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
42
Using even one ____ statement in a program is almost always a sign of bad programming structure.
A)enum
B)typedef
C)goto
D)#define
A)enum
B)typedef
C)goto
D)#define
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
43
The ____ operator causes a bit-by-bit AND comparison between its two operands.
A)~
B)^
C)&&
D)&
A)~
B)^
C)&&
D)&
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
44
1 0 1 1 0 0 1 1 ____ 1 1 0 1 0 1 0 1 results in 1 0 0 1 0 0 0 1.
A)&
B)|
C)>>
D)<<
A)&
B)|
C)>>
D)<<
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
45
____ bit operations are extremely useful in masking, or eliminating, selected bits from an operand.
A)&
B)|
C)>>
D)<<
A)&
B)|
C)>>
D)<<
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
46
1 0 1 1 0 0 1 1 ____ 1 1 0 1 0 1 0 1 results in 1 1 1 1 0 1 1 1.
A)&
B)|
C)>>
D)<<
A)&
B)|
C)>>
D)<<
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
47
____ is the exclusive OR operator.
A)&
B)|
C)^
D)~
A)&
B)|
C)^
D)~
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
48
1 0 1 1 0 0 1 1 ____ 1 1 0 1 0 1 0 1 results in 0 1 1 0 0 1 1 0.
A)&
B)|
C)^
D)~
A)&
B)|
C)^
D)~
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
49
The complement operator, ____, is a unary operator that changes each 1 bit in its operand to 0 and each 0 bit to 1.
A)&
B)|
C)^
D)~
A)&
B)|
C)^
D)~
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
50
For unsigned integers, each left shift (using the << operator) corresponds to ____.
A)multiplication by 2
B)division by 2
C)multiplication by 4
D)division by 4
A)multiplication by 2
B)division by 2
C)multiplication by 4
D)division by 4
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
51
In an arithmetic right shift (using the >> operator), each right shift corresponds to ____.
A)multiplication by 2
B)division by 2
C)multiplication by 4
D)division by 4
A)multiplication by 2
B)division by 2
C)multiplication by 4
D)division by 4
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
52
In the equivalence statement #define SQUARE(x) x * x, x is ____.
A)fixed
B)an error
C)a variable
D)an argument
A)fixed
B)an error
C)a variable
D)an argument
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
53
#define SQUARE(x) x * x
Val = SQUARE(num1 + num2);
Results in the equivalent statement ____.
A)val = num1 + (num2 * num1 + num2);
B)val = (num1 + num2 * num1) + num2;
C)val = (num1 + num2) * (num1 + num2);
D)val = num1 + num2 * num1 + num2;
Val = SQUARE(num1 + num2);
Results in the equivalent statement ____.
A)val = num1 + (num2 * num1 + num2);
B)val = (num1 + num2 * num1) + num2;
C)val = (num1 + num2) * (num1 + num2);
D)val = num1 + num2 * num1 + num2;
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
54
Upon encountering the command line pgm14.3 three blind mice, the operating system stores it as a sequence of ____ strings.
A) one
C) four
B) three
D) five
A) one
C) four
B) three
D) five
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
55
To standardize arguments passing to a main() function, only ____ item(s) is/are allowed.
A) one
C) three
B) two
D) four
A) one
C) three
B) two
D) four
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck