Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Answer the questions in C++ 1. Given the following statements to compute a dividend price: divd_price = orig_price; if (orig_price > 1000) divd_price = orig_price

Answer the questions in C++

1. Given the following statements to compute a dividend price:

divd_price = orig_price;

if (orig_price > 1000)

divd_price = orig_price + 100;

What is the value of divd_price if the orig_price is 1000 and 1100?

Select one:

a. 1100, 1200

b. 1000, 1200

c. 1000,1100

d. 1100, 1100

2. Which of the following statements is NOT TRUE about a structure?

Select one:

a.a structure is a class with no methods

b.a structure cannot contain other structures

c. initialization of a structure follows the same rules as arrays

d.a structure can store different types of data under a single name

3. To open a file in c:\example\scores.txt on Windows, you use ___.

Select one:

a.stream.open("scores.txt");

b.stream.open("c:\\example\\scores.txt");

c.stream.open("\example\scores.txt");

d.stream.open("c:\example\scores.txt");

4. To display 236bb from the digits 236, the format manipulators involved are:

(note: b represents a blank)

Select one:

a.setw(5) and setprecision (2)

b.setw(5), fixed and setprecision(2)

c.setw(5) and left

d.setw(5)

5. What is the size of the following array?

string prophets[10] = {"Musa", "Adam", "Ayub", "Luth"};

Select one:

a.4

b.10

c.5

d.invalid

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

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students also viewed these Databases questions