Question

10) What is the output when the following code fragment is executed? void exam(int i) {cout « i; } void main() { int n; for (

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:-

Plz give thumbs up.Thank u

C) 34

First,for loop takes n=3 ,checks the conditon (3<=4) it is true so the body of loop is executed. function prints the value 3.After it increment the value of n and It takes n=4, (4<=4) true,loop is executed and prints value 4.if n=5, (5<=4) conditon in false ,So the body of loop doesn't execute.

Add a comment
Know the answer?
Add Answer to:
10) What is the output when the following code fragment is executed? void exam(int i) {cout...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT