Computer Science, asked by ankit584756, 1 year ago

evaluate the following c++ expressions

Attachments:

Answers

Answered by hoxabel
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