Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Multiple Choice (30 Points) Each Question has only one correct answer. i) The translated version of a source program is called: a) An assembly

1. Multiple Choice (30 Points) Each Question has only one correct answer. i) The translated version of a source program is called: a) An assembly program b) The executable program c) An Object program d) A C++ program ii) 4 % 10 = ? a) 2 b) 0 c) 0.4 d) 4 iii) Which of the following is not a valid data type in C++ a) long double b) short c) Long d) bool iv) Which of the following is a valid comment statement? a) \* Programming is Fun */ b) /* Programming is Fun /* c) \* Programming is Fun *\ d) /* Programming is Fun */ v) Given the following: float X; X = 14/5 * 5.0; What will be the value for X? a) 0 b) 14.0 c) 10.0 d) Invalid Operation vi) Which one is the correct reserved word for determining the maximum value of a long double data? a) LONGD_MAX b) LONG_MAX c) LDBL_MAX d) LONGDOUBLE_MAX vii) Which of the following expression results in a value 1? A. 4 % 5 B. 15 % 4 C. 25 % 5 D. 16 % 5 viii) Which of the following is the correct expression that evaluates to true if the number x is between 1 and 100 or the number is negative? a) 1 < x < 100 && x < 0 b) ((x < 100) && (x > 1)) && (x < 0) c) (1 > x > 100) || (x < 0) d) ((x < 100) && (x > 1)) || (x < 0) ix) Given the following: int count = 10; while (count > 1) { cout << Good Morning << endl; count = count/2; } cout << count << endl; What value of count will be displayed when the above loop is being evaluated? a) 1 b) 2 c) 0 d) 3 x) What will be the value of sum after the loop is being executed? int count = 2; int sum = 0; do { sum += count; count = count + 2; } while (count < 10); a) 10 b) 20 c) 30 d) 40 xi) Which header file is required to be used for using DBL_MAX? a) cdouble b) cstdlib c) cfloat d) climits xii) The order of the precedence (from high to low) of the operators /, >, &&, +, a) &&, >, /, + b) >, /, +. && c) +, /, >, && d) /, +, >, && xiii) Which one is not a valid constant of any type? a) \b b) ab c) -2.45e-09 d) false xiv) Which of the following is an incorrect C++ statement (Assume all variables are defined and initialized) a) cout << pow(x, 2) 3 * x << endl; b) y = 2.35E+19; c) cout << fixed << setprecision(2); d) x + 2 = y; xv) Which one is not a valid relational operator? a) != b) >= c) && d) ==

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

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

4th Edition

0805360476, 978-0805360479

Students also viewed these Databases questions

Question

LO3.3 Describe supply and explain how it can change.

Answered: 1 week ago

Question

LO3.1 Characterize and give examples of markets.

Answered: 1 week ago