1. Engineering
  2. Computer Science
  3. c1a2e0 6 points total 1 point per guestion no program...

Question: c1a2e0 6 points total 1 point per guestion no program...

Question details

C1A2E0 (6 points total 1 point per guestion- No program required Assume language standards compliance and any necessary sup port code unless stated oth erwise Testing emoneous or implem entation dependent code by running it can be misle a ding. These are not trick questions and each has only one correct answer. Major applicable course book notes are liste d 1. The data type of the literal 252767 is: 4. Predict the values of 5/-2 and 5/-2.0 on (Notes 2.1& 2.2) A. implementation dependent B. long C. int D. not d efined in standard C E. none of the ab ove pre-C99 and pre-C++11 com pilers (Note 2.8) A. two possibilities: 2 and-2.5 or -3 and -2.5 B. two possibilitie s: 2 and -2.5 or -1 and -2.5 C. -2 and -2.500000 D. A gen eral pre diction cannot be made 2. The data types of a) unsuffixed flo ating literals and b) unsuffixed integer literals, are for all imple mentations E. None -a compiler or run time erro (Notes 2.2 and 2.4) OCcurs A. implementation dependent in both B. determined by the value of the lit erals in C. a) double D. a) double cases both cases b) determined by the number of digits b) determined by the value and base of 5. If char is 8 bits and int is 16 bits, pre dict the values of-7 % 3 and size of(-5 % 3) on pre- C99 and pre-C++11 compilers (Notes 2.8 & 2.12) A. two possibilities: 1 and 2 or 2 and 2 B. two possibilities: 1 and or 1 and 2 C. three possibilities the literal E. none of the above -1 and 2 or 2 and 2 or -2.3 and 2 D. 1 and 2 or 1 and 4 depending upon the data type of sizeof 3. A mathe matic al o peration where all E. Such a prediction cannot be made for operands are type char: (Note 2.10) A. is ille g al -type char is only used for all im plementations 6. Which of the following guarantees the character operations. comect answer on any ma chine? (Notes 2.10 & 2.11) A. long value 300 40010L B. long value 300 400L 10; C. float value 300 400 10 D. double value (double)(300 400 10L) E. none of the above because th e value B. s evaluated using type signed char anth metic C. is evaluated using type char arthm etic D. is evaluated using type int or unsigned int arith metic cannot be writt en portably E. of each is implementation dependent
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution