Question: 26. What is the output when the following code fragment is executed? (2 pts) int n, k = 5; out put n = (100

 26. What is the output when the following code fragment is executed? (2 pts) int n, k = 5; out put n = (100 %   

26. What is the output when the following code fragment is executed? (2 pts) int n, k = 5; out put n = (100 % k? k + 1: k-1); cout < < "n= "

Step by Step Solution

3.48 Rating (158 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

This is a piece of code in C which involves the use of the ternary conditional operator and t... 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 Programming Questions!