01-14-2012, 03:01 AM
Cs504 quiz no 3 fall 2012
[FONT="]In the switch statement, cases should always end with a -------statment.[/FONT]
Switch
Go
Break
Stop
[FONT="]Bit fields allow the packing of data in a structure. using Bit fields we can:[/FONT]
Read 9 bit integers
avoid memory leakages
avoid memory overflow
Avoid syntax errors
[FONT="]A tricky sequence of fallthrough code using switch statement with no Break statments used, causes more trouble than being helpful.[/FONT]
True
False
[FONT="]Be very careful when you use functions with side effects – functions that change the values of the ________[/FONT]
Objects
Classes
Structures
Variables
[FONT="]Complex expressions:[/FONT]
Make the code difficult to modify
[FONT="]The C/C++ language does not define the alignment of items within[/FONT]
Structures
Classes
Unions
All of the given options
[FONT="]Some bit field members are stored: I) left to right II) right to left III) in circular array[/FONT]
only (I) is true
Only (II) is true
Both (I) and (II) are true
All of the options (I, II and III) are true
[FONT="]_________ cause major portability issues[/FONT]
Loops
Bugs in code
Sizes of data types
Conditional Structures
[FONT="]The order in which bytes of one word are stored is _________ dependent[/FONT]
[FONT="]Hardware[/FONT]
[FONT="]Software[/FONT]
[FONT="]Language[/FONT]
[FONT="]Syntax[/FONT]
[FONT="]x = 0; // x is floating pt Which rewritten form of above line of code is more in line with the self-documentation philosophy than the code above.[/FONT]
x = false
x = NULL
x = 0.0;
x = ‘\0’
[FONT="]In the switch statement, cases should always end with a -------statment.[/FONT]
Switch
Go
Break
Stop
[FONT="]Bit fields allow the packing of data in a structure. using Bit fields we can:[/FONT]
Read 9 bit integers
avoid memory leakages
avoid memory overflow
Avoid syntax errors
[FONT="]A tricky sequence of fallthrough code using switch statement with no Break statments used, causes more trouble than being helpful.[/FONT]
True
False
[FONT="]Be very careful when you use functions with side effects – functions that change the values of the ________[/FONT]
Objects
Classes
Structures
Variables
[FONT="]Complex expressions:[/FONT]
Make the code difficult to modify
[FONT="]The C/C++ language does not define the alignment of items within[/FONT]
Structures
Classes
Unions
All of the given options
[FONT="]Some bit field members are stored: I) left to right II) right to left III) in circular array[/FONT]
only (I) is true
Only (II) is true
Both (I) and (II) are true
All of the options (I, II and III) are true
[FONT="]_________ cause major portability issues[/FONT]
Loops
Bugs in code
Sizes of data types
Conditional Structures
[FONT="]The order in which bytes of one word are stored is _________ dependent[/FONT]
[FONT="]Hardware[/FONT]
[FONT="]Software[/FONT]
[FONT="]Language[/FONT]
[FONT="]Syntax[/FONT]
[FONT="]x = 0; // x is floating pt Which rewritten form of above line of code is more in line with the self-documentation philosophy than the code above.[/FONT]
x = false
x = NULL
x = 0.0;
x = ‘\0’
