Question
Question 5 (1 point) How many times will this loop run? for(int i=0; i>=10;i+=10) { //doing something } Question 5 options: 10 11 0 1
Question 5 (1 point)
How many times will this loop run?
for(int i=0; i>=10;i+=10)
{
//doing something
}
Question 5 options:
| 10 |
| 11 |
| 0 |
| 1 |
Question 6 (1 point)
What output does the following code store in the string s?
string s = "Four: " + 2 + 2;
Question 6 options:
| Four: 4 |
| Four: 2 + 2 |
| Four: 22 |
| none of these |
Question 7 (1 point)
How many times will the following loop run?
int x=5;
while(x<10)
{
x*=-2;
}
Question 7 options:
| 0 |
| 1 |
| 2 |
| 3 |
Question 8 (1 point)
The continue statement stops the current iteration of the loop by skipping to the end then proceeding with the next iteration.
Question 8 options:
True | |
False |
Question 9 (1 point)
When a string is involved in concatenation with any other type the result is always a string.
Question 9 options:
True | |
False |
Question 10 (1 point)
Consider the string object having the value of "This is fun". The substring method that takes one value is given a parameter of 5. Is the result "is fun"?
Question 10 options:
True | |
False |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started