# Quiz on Maths

Here's a short quiz to test your understanding of the mathematics in c++.

1

What is the output from the following C++ program?

```
int a,b,sum,subtr;
a=100;
b=20;
sum=a+b;
subtr=a-b;
cout << "sum is: "<< sum;
cout << "subtr is: " << subtr;
```

A)

`sum`

is: `100`

`subtr`

is: `20`

B)

`sum`

is: `20`

`subtr`

is: `100`

C)

`sum`

is: `120`

`subtr`

is: `80`

D)

`sum`

is: `80`

`subtr`

is: `120`

Question 1 of 50 attempted

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy