Question: a) Assume the following code is run as a part of a programme. State the value of i, j, and k after each line

a) Assume the following code is run as a part of a programme. State the value of i, j, and k after each line

a) Assume the following code is run as a part of a programme. State the value of i, j, and k after each line is executed. int i{ 2 }, j{3}, k{}; k = ++i+j/2; k += (i++) %j; k = i*(--j) + 1 / 2; j / = 4; {int j{10}, k{0};}; k = j*(1+2); b) What are pre-processor directives and header files? Show how they can be included in a code, and give an example of two headers and what they are used for.

Step by Step Solution

3.60 Rating (157 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Lets break down the code line by line to determine the values of i j and k after each line is execut... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Network Questions!