Answer:
Option 3 is the correct answer.
Explanation:
- In c, c++ or Java programming language, The for loop takes three parameters in which first is an initialization, second is condition check and the third is an increment. None of the other loop (except for loop) takes three parameters. The other loop takes only one parameter and that is the condition check.
- So when a user knows about the times of iteration then it is a good choice to use the for loop but when the person does not know about the times of iteration if the loop. It means the iteration of the loop is based on the condition then it is a good choice to chose while or Do-while loop.
- The above question wants to ask which loop for a user can best if he familiar with the iteration of the loop then the answer is for loop which is started from option 3. Hence Option 3 is the correct answer while the other is not because--
- Option 1 states about the do-while loop which takes condition only.
- Option 2 states about the while loop which also takes condition only.
- Option 4 states about the infinite loop which is not any loop.
- Option 5 states about none of these which is not correct because option 3 is the correct answer.
What do you mean pieces? Like Laptop components? If so then motherboard,ram,cpu, and psu for a basic laptop so 4 I guess (5 if you want to include a gpu).
Answer:
scores.append(6,2)
Explanation:
This is a complicated question because in theory, scores.insert can also add values, but I am sure that the only line of code that would work is scores.append(6,2)
Answer:
//here is code in java.
import java.util.*;
class Solution
{
// main method of class
public static void main (String[] args) throws java.lang.Exception
{
try{
// declare an initialize first string variables
String st1="hello";
// declare an initialize first string variables
String st2="world";
// create another string variable
String st3;
// exchange the value of both string variables
st3=st1;
st1=st2;
st2=st3;
System.out.println("value of first String after exchange: "+st1);
System.out.println("value of second String after exchange: "+st2);
}catch(Exception ex){
return;}
}
}
Explanation:
declare and initialize two string variables.Create another string variable "st3". first assign value of "st1" to "st3" after then value of "st2" to "st1" and then assign value of "st3" to "st2". This will exchange the values of both the string.
Output:
value of first String after exchange: world
value of second String after exchange: hello
Answer:
UPDATE acctmanager WHERE amid = 'J500';
Explanation:
The statement written above is not valid SQL statement because there is no SET after UPDATE. Update is always used with SET.If you are updating something then you need to specify the value with which that value should be replaced.
UPDATE acctmanager SET amname = UPPER(amname);
This statement does not contains WHERE clause but it will run all the values of amname column will get updated in the table acctmanager.