Home
Q&A
Education
Technology
Credit
General
Health
Insurance
Questions
Ask a Question
No spammers please do it clear (show your work also) and how the answer comes please…int m=2 and int n=15for(int i=1;i<5;i++)m++;–n;System.out.println(“m=”+m);
Home
Education
No spammers please do it clear (show your work...
asked
Dec 23, 2021
in
Education
by
JackTerrance
No spammers please do it clear (show your work also) and how the answer comes please… int m=2 and int n=15 for(int i=1;i<5;i++) m++;–n; System.out.println(“m=”+m); System.out.println(“n=”+n); Select the correct answer from above options
computer-science-interview-questions
computer-science-questions
1
Answer
0
votes
answered
Dec 23, 2021
by
JackTerrance
Best answer
The output will be, m=6, n=14 Since there is no braces given for the loop, it means only m++ is the part of the loop.
Related questions
0
votes
Q: Analyse the given program segment and answer the following questionsi) write the output of the program segment ii)how many times does the body of the loop gets executefor(int m=5 ; m<=20 ;m+=5){if (m%3= = 0)break;elseif (m%5= = 0) System.out.println(m) continue;}
Analyse the given program segment and answer the following questions i) write the output of the program segment ii)how many times ... body of the loop gets execute for(int m=5 ; m...
asked
Nov 29, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: int n=10;int res=(n–+10>–n×5)?++n:n++ System.Out.println(res+”,”+n); what is the output
int n=10;int res=(n–+10>–n×5)?++n:n++ System.Out.println(res+”,”+n); what is the output Select the correct answer from above options...
asked
Dec 30, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: How many times the following loop will execute? And, what will be the output of this loop?int m=3;for (; m<=30; ){System.out.println(m);m += 3;
How many times the following loop will execute? And, what will be the output of this loop? int m=3; for (; m...
asked
Nov 27, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: How many times the following loop will execute? And, what will be the output of this loop?int m=3;for (; m<=30; )1System.out.println(m);m += 3;
How many times the following loop will execute? And, what will be the output of this loop? int m=3; for (; m...
asked
Nov 27, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: What is the output of the following:System. out. Println(“Time\n and \t tide waits for\”no man\””);
What is the output of the following: System. out. Println(“Time\n and \t tide waits for\”no man\””); pls answer Select the correct answer from above options...
asked
Dec 24, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: In Java,what will be the output of the following code and how?double x=2.9,y=2.5;(SOP is abbreviated form of System.out.println)SOP(Math.min(Math.floor(x),y));SOP(Math.max(Math.ceil(x),y));
In Java, what will be the output of the following code and how? double x=2.9,y=2.5; (SOP is abbreviated form ... x),y)); Explain how Select the correct answer from above options...
asked
Nov 28, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: class Modulus {public static void main(String args[]){double a = 25.64;int b = 25;a = a % 10;b = b % 10;System.out.println(a + ” ” + b);}
class Modulus { public static void main(String args[]) { double a = 25.64; int b = 25; a = a % 10; b = b % 10; ... (a + + b); } } Select the correct answer from above options...
asked
Dec 19, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: What would be the output of the following program segments? Give reasons to justify your answer.i) System.out.print(“Sum =”+6 + 2);ii) System.out.print(“Sum = ”+ ‘B’+ ‘2’);iii) System.out.print(“Sum = ”+ 6 + ‘B’);iv) System.out.print(“Sum = ”+ (‘B’ + ‘a’));
What would be the output of the following program segments? Give reasons to justify your answer. i) System.out.print( Sum ... + a ); Select the correct answer from above options...
asked
Nov 27, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: 15.#include <stdio.h>#define foo(m, n) m + nint main(){int a = foo(5,13);
15. #include #define foo(m, n) m + n int main() { int a = foo(5,13); printf(“%d”, a); Select the correct answer from above options...
asked
Dec 30, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: Main components of social movement.(Please describe it breifly, i want 5 heading wise answer)
Main components of social movement.(Please describe it breifly, i want 5 heading wise answer) Select the correct answer from above options...
asked
Aug 3, 2022
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: State the type of errors if any in the following statements:(i) switch ( 2 );(ii) System.out.println(670/0);
State the type of errors if any in the following statements: (i) switch ( 2 ); (ii) System.out.println(670/0); pls answer Select the correct answer from above options...
asked
Dec 25, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: What is the value of m after evaluating the following expression:m -= 9%++n + ++n/2; when int m=10,n=6.
What is the value of m after evaluating the following expression:m -= 9%++n + ++n/2; when int m=10,n=6. Pls Answer Now.. Select the correct answer from above options...
asked
Dec 15, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: What Is the output of the following:String a=”Java is programming language \n developed by \t\’James Gosling\'”;System. out. println(a);
What Is the output of the following:String a= Java is programming language \n developed by \t\'James Gosling\' ... ; Please Answer ASAP Select the correct answer from above options...
asked
Dec 14, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: convert the following into For loop;while(true)System.out.print(‘*’);(in java )PLEASE ANSWER FAST…
convert the following into For loop; while(true) System.out.print(‘*’); (in java ) PLEASE ANSWER FAST… WILL MARK BRAINLIEST** Select the correct answer from above options...
asked
Dec 31, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: wap to obtain 2 numbers from the user and then display the maximum number out of those 2 numbers and also display how much it is maximum from the number?n
wap to obtain 2 numbers from the user and then display the maximum number out of those 2 numbers and also display ... from the number?n Select the correct answer from above options...
asked
Dec 25, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
...