evaluate the following c++ expressions
Attachments:
Answers
Answered by
5
Evaluate the following C++ expressions:
First we have:
int a = 5, b = 7, c;
Now c = a * a + b * b;
If you try to print out the c using:
std:cout << c << endl;
The output will be: 74.
Therefore c is equal to 74.
Solving for k:
int i = 10; j = 20, k;
Now k = (i+j)/3; //10
If you print out the k using:
std:cout << k << endl;
You will get: 10.
Therefore k is equal to 10.
Similar questions