Which is NOT a C data type A const B float C double D char I
Which is NOT a C++ data type? A. const B. float C. double D. char In the following equation, what would be placed in x (x is as Integer)? x = 20/6 * 5/10 + 5/3 ? A. 2 B. 3 C. 4 D. 5 What is the valve in i after this code is executed? int i = 4; ++1; ++i; A. 4 B. 5 C. 6 D. The statement won\'t compile. In the equation x = y/z, y and z are both int. Variable x is a double, and y = 25, z = 11. What will be the value of the variable x? A. 14.0000000000 B. 0.27272727 C. 2.27272727 D. 2.000000 Why does a variable need a data type? A. The program knows what kind of data it is. B. You know what type of data goes in the variable. C. The data type initiates the variable. D. The program needs to use the variable. What symbol may NOT be used in variable names? A. underscore B. # C. 3 D. a In the equation x = y%z if all three variables are int, the values are y = 25 and z = 11, what will be the value of the variable x? A. 2 B. 3 C. 14
Solution
9th ans)const......it not a data type
10th ans)2 it evaluate based on operator precedence .here * ,/ has highest precedence compare to + etc;
11th ans)6.....in first ++i it becomes 5 and next preincrement it becomes 6
12th ans)2.000.......here the output is integer value =2 as we assigned to double data type it converted to 2.000
13 ans)the data type need to initialize the variable.
14th ans)#......it is not used as variable name rest all can be used.
15th ans)3
