M2: Quiz

Term
1 / 15
Implicit type conversion is commonly refer to as __________ .

a) Typing
b) Casting
c) Paradigm
d) Coercion
Click the card to flip 👆
Terms in this set (15)
Which of the following statements are correct if a language is strongly typed. Select all that apply.

a) The variable size can be determined at execution time.
b) Each name in a program has a single type associated with it.
c) Type errors are always reported.
d) Type is not known at compilation time.
In a given programming and execution environment, a variable declaration in C binds a name to a memory location. What else are also determined in declaration? Select all that apply. a) Variable type b) The time period that the variable will be in a register of the computer. c) Variable scope d) Variable size (number of bytes)a) Variable type c) Variable scope d) Variable size (number of bytes)Assume a variable is declared in a block of code within a pair of curly braces. The scope of the variable ______ a) covers the entire block, including the code before the declaration point. b) starts from its declaration point and extends to the end of the entire program. c) starts from its declaration point and extends to the end of the block. d) covers the entire program, including the code in the other blocks.c) starts from its declaration point and extends to the end of the block.Which of the following types is a C++ type, but NOT a C type? a) bool b) char c) double d) voida) boolWhich of the following C declarations (contextual level) will cause a compilation issue? a) int d[] = {12.24, 47.13}; b) int a[] = {12, 24}; c) int b[2]; d) int c[] = {'a', 'b', '\0'};a) int d[] = {12.24, 47.13};Which of the following C assignment statements (assign a value to a variable at the semantic level) will NOT cause a compilation issue? Assume the array has been declared as: char a[5]; a) a = "hi"; b) a = "h"; c) a[] = {'h', 'i'}; d) a[0] = 'h';d) a[0] = 'h';