Question

Semester 2 & Trimester 3B, 2015 COMP1004 Engineering Programming Question 3 - Repetition (20 marks) Q3(a) What will be printed when the following code is executed? (5 marks] #include <stdio.h> int main() int i, j; for(i=1;i<17;i=i+2) { printf(%d==, i); for(j=i; j>0;j--) printf(#); printf(\n); return 0; == # 3 = = # # # 5 == ### ## 7 #### #

Please answer the above queston (in terms of C programming) and explain answer

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

i is basiclly counting odd numbers from 1 to 15. j is counting from current value of i to 1 backwards and printing a hash(#) each time it does so.

Add a comment
Know the answer?
Add Answer to:
Please answer the above queston (in terms of C programming) and explain answer Semester 2 &...
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