
Unit 4 Opener - Predefined Functions & Casting
Authored by Richard Ghiorse
Computers
9th - 12th Grade
Used 7+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which include directive is necessary to use the pow and sqrt functions?
#include<math>
#include<cmath>
#include<cstdlib>
#include<mathlibrary>
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the value of the expression below?
ceil(10.2)
10.0
10.2
11.0
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the value of the expression below?
floor(99.9)
100.0
99.0
99.9
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output from the code segment below?
int x = 7;
int y = 2;
double q = x / y;
cout << q;
3.5
3
4
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output from the code segment below?
int x = 7;
int y = 2;
double q = (double) x / y;
cout << q;
3.5
3
4
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output from the code segment below?
double y = 12.3;
int x = (int) (y + 0.5);
cout << x;
12.8
13
12
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output from the code segment below?
double y = 89.7;
int x = (int) (y + 0.5);
cout << x;
90.2
90
89
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?