Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started