Answer:
123456
Explanation:
When an integer value is added to a string value the resulting value is a string.+ operator is used for both numeric additions and string addition also knows as string concatenation. In addition when one operand of the equation is a string the program interprets all values as string. As system is interpreting all values as a string it will apply a string addition method instead of mathematical addition.So here A is a string and B is an integer value. when we add A and B system will treat B aslo as a string, upon addition the result will be String concatenating both A and B to a single string.Hence the result of A+B will be
A+B = 123456
As WriteLine method takes string as Input it will just write the resulting string to file
Answer:
Following is given the required program. All the steps are described by comments. The sample output for the program is also attached.
I hope it will help you!
Explanation:
Answer:
False is the correct answer for the above question.
Explanation:
- In java programming language or any other programming language, any loop can be infinite.
- It is because the infinite loop is called for that loop which is not run in a finite number of times.
- The loop is used to repeat some lines in a finite number of times. Any loop has three things- first is the initial value which tells the loop to start, The second is the condition check which states when the loop will stop and the third is an operation which directs some variable, so that the condition may be false after some finite amount of time.
- If the condition will not false in any iteration of the loop, then the loop can proceed for an infinite amount of time.
- The above-question states that the while loop and do while loop can be infinite which is a true statement.
- But it also states that the 'for' loop can not be infinite which is not a correct statement which is described above. Hence false is the correct answer to the above question.