Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transactions On Large Scale Data And Knowledge Centered Systems X Special Issue On Database And Expert Systems Applications Lncs 8220

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Stephen W. Liddle ,Klaus-Dieter Schewe ,Xiaofang Zhou

2013th Edition

3642412203, 978-3642412202

More Books

Students also viewed these Databases questions