C# Programming Test

What is the difference between a for and a while loop?
For loop - Don't know how many times to loop | While loop - you know how many times you want to loop
For loop - Know how many times you want to loop | While loop - you don't know how many times to loop
What does the following code output?
*****
****
5 stars vertically
4 stars vertically
What does the following code output?
Hiya
Hello
World
Goodbye
Christmas
At the end of the program, what is stored inside answer?
0
1
2
3
4
5
How many times would this loop iterate (Run) ? Hint: "!" = not
1
2
3
4
5
What will the following code output?
1
13
135
What will the following code output?
Hello
Hi
Hiya
HelloHiHiya
What will the following code output?
Hello
HelloHi
HelloHiHiya
Hi
HiHiya
Hiya
What will the following code output?
8
9
35
53
"5"3
What is the proper way to call the Add method to add up the two variables in this program?
Add(number1, number2);
Add(myFirstNumber, mySecondNumber):
Add(int number1, int number2);
Add(int myFirstNumber, int mySecondNumber);
0
{"name":"C# Programming Test", "url":"https://www.quiz-maker.com/QMBT1P1","txt":"What is the difference between a for and a while loop?, What does the following code output?, What does the following code output?","img":"https://cdn.poll-maker.com/24-914665/2nd-question.png?sz=1200"}
Powered by: Quiz Maker