Search Header Logo

CPP-TESTING

Authored by John Oli

Information Technology (IT)

University

Used 1+ times

CPP-TESTING
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

9 questions

Show all answers

1.

FILL IN THE BLANKS QUESTION

1 min • 1 pt

FILL IN THE BLANK To declare a floating-point variable named "price" with value 10.50,

float (a)   = 10.50;

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

MULTIPLE CHOICE What will be the output of:

cout << fixed << setprecision(2) << 5.678;

5.67

5.68

5.6

5.678

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

TRUE/FALSE The statement float total = price * quantity; performs addition.

True

False

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

MULTIPLE CHOICE Which data type would be most appropriate for storing the number of items sold?

float

int

char

string

5.

FILL IN THE BLANKS QUESTION

1 min • 10 pts

Media Image

CODE COMPLETION Complete this code to calculate and display the total:

float apple = 5.50,

banana = 3.25;

float _______ = apple + banana;

cout << "Total: " << _______;

(a)  

6.

FILL IN THE BLANKS QUESTION

1 min • 10 pts

Media Image

OUTPUT PREDICTION

What will be the output / Display of this code?

int x = 25; int y = 4;

int result = x / y;

cout << "Answer: " << result;



(a)  

7.

FILL IN THE BLANKS QUESTION

1 min • 10 pts

Media Image

OUTPUT PREDICTION

What will this display?



(a)  

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?