Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ram required Assu me language standards compliance and any necessary support code unless stated oth esting erroneous or implementation dependent code by running it can

image text in transcribed
ram required Assu me language standards compliance and any necessary support code unless stated oth esting erroneous or implementation dependent code by running it can be misleading. These 3 trick questions and each has only one correct answer. Major applicable course book notes are l 1. The data type of the literal 252767 is 4. Predict the values of 5/-2 and 5/-2.0 (Notes 2.1 & 2.2) A. implementation dependent B. long pre-C99 and pre-C++11 compilers. A. two possibilities B. two possibilities: C. -2 and -2.500000 2 and-2.5 or -3 and -2.5 D. not defined in standard C E. none of the above 2 and -2.5 or -1 and-2.5 2. The data types of D. A general prediction cannot be made for all implementations None - a compiler or run time error occurs a) unsuffixed floating literals and b) unsuffixed integer literals, are (Notes 2.2 and 2.4) A. implementation dependent in both E. cases If char is 8 bits and int is 16 bits, predict the values of .7 % 3 and sizeof(-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 2 or 1 and.2 C. three possibilities: 5. B. determined by the value of the literals in both cases C. a) double b) determined by the number of digits D. a) double b) determined by the value and base of the literal 1 and 2 or 2 and 2 or -2.3 and 2 E. none of the above D. -1 and 2 or -1 and 4 depending upon the data type of sizeof Such a prediction cannot be made for all implementations. A mathematical operation where all operands are type char (Note 2.10) A. is illegal-type char is only used for 3. E. 6. Which of the following guarantees the correct answer on any machine? (Notes 2.10 & 2.11) A. long value 300 400 10L 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 the value character operations B. is evaluated using type signed char arithmetic C. is evaluated using type char arithmetic. D. is evaluated using type int or unsigned int arithmetic. cannot be written 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

Students also viewed these Databases questions

Question

Consistently develop management talent.

Answered: 1 week ago

Question

Create a refreshed and common vision and values across Europe.

Answered: 1 week ago

Question

Provide the best employee relations environment.

Answered: 1 week ago