Click here to Skip to main content
15,891,950 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I have few multiple choice questions I need their answers :))
Which looping statement is best if the number of iterations is known?
1- For
2- While
3- Do / While
4-All looping processes require that the iterations be known

Which looping statement should have the number of iterations known?
1- For
2- While
3- Do / While
4-All looping processes require that the iterations be known

Which have the bigger size?
1-Outer loop
2-Inner loop
3-They both have the Same size
4-We can’t know without see the size

If you use continue, To where it will jump?
1-to the beginning of the loop
2-to the next iteration
3-to the end of the loop
4- -to the end of current loop

Thank you

What I have tried:

I have looked into my textbook but it didn't explain
Posted
Updated 15-Dec-17 9:16am
Comments
enhzflep 15-Dec-17 12:12pm    
As well as looking at your text book, look on the internet.

As in, do your own research and find the answers to these questions yourself. Asking the questions in a public forum before reporting the given answers does not constitute finding the answers for yourself.
Member 13578446 15-Dec-17 12:15pm    
I have searched in the internet, it didn't help
CHill60 15-Dec-17 12:19pm    
Why not have a go at answering the questions yourself (use the "Improve question" link and put the answers into "What I have tried:" section.
We can tell you if you are right or wrong

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!

If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!
 
Share this answer
 
 
Share this answer
 
Quote:
I really tried to solved my self

This is not something to solve, the questions are here to test your knowledge.
So the idea is that you study those structures, experimenting with very short pieces of code may help to understand what is doing what.
You have a lot of material available: your lessons, books, tutorials...

You can't learn by having someone studying for you.
You will never win a race by having someone else training for you.
Quote:
I have searched in the internet, it didn't help

You will probably not find direct answers to those questions, because the answers imply that you understand the looping structures.

We do not do your HomeWork.
HomeWork is not set to test your skills at begging other people to do your work, it is set to make you think and to help your teacher to check your understanding of the courses you have taken and also the problems you have at applying them.
Any failure of you will help your teacher spot your weaknesses and set remedial actions.
 
Share this answer
 
v2
I feel with you and I can't really help. All These questions are "something stupid". As you see no of the experts take the risk to answer them.

Why stupid, e.g:
Which looping statement is best if the number of iterations is known?
1- For
2- While
3- Do / While
4-All looping processes require that the iterations be known

"for" and "while" are techically the "same", simply the Syntax differs slightly. "Do/While" differs especally that it performs the Loop at least one time, until the condition will be checked.

Now I see the comments comming: But the Compiler/Interpreter does optimize this or that in a better way.... Who cares about the Compiler Details? Do I (as a programmer) really Need to care about such low Level things like "which Syntax" the Compiler translates better?


Sorry not to be a big help. Try to Focus onto "how to Abstract" a Problem in a language and don't waste time with such silly stuff.... and maybe tell that later to your teacher ;)


[Edit]
Question like these, let remember me to a prof during study which frequently asked in exams to "optimize" some code with ternary Operation....
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900