Home
Q&A
Education
Technology
Credit
General
Health
Insurance
Questions
Ask a Question
What is the value of m after evaluating the following expression:m -= 9%++n + ++n/2; when int m=10,n=6.
Home
Education
What is the value of m after evaluating the...
asked
Dec 15, 2021
in
Education
by
JackTerrance
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
computer-science-interview-questions
computer-science-questions
1
Answer
0
votes
answered
Dec 15, 2021
by
JackTerrance
Best answer
We have, int m = 10, n = 6. Program: m-= 9%++n + ++n/2; Output: 4 Explanation: m = 10 – [9%++n + ++n/2] = 10 – [9%7 + 8/2] = 10 – [2 + 4] = 10 – 6 = 4. Modulo operator(%) computes remainder. Hope it helps!
Related questions
0
votes
Q: What is the value of m after evaluating the following expression:
What is the value of m after evaluating the following expression: m – = 9%++n + ++n/2; when int m=10,n=6 Select the correct answer from above options...
asked
Dec 1, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: 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);
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...
asked
Dec 23, 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: Write the output for the followingi) char c = ‘A’ ;int m = 26 ;int n = c + m ;
Write the output for the following i) char c = ‘A’ ; int m = 26 ; int n = c + m ; System.out.println(“ n = “ +n) ; 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: Write the output for the followingi) char c = ‘A’ ;int m = 26 ;int n = c + m ;
Write the output for the following i) char c = ‘A’ ; int m = 26 ; int n = c + m ; System.out.println(“ n = “ +n) ; Select the correct answer from above options...
asked
Dec 18, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: Q.32 :-What will the SWAP macro in the following program beexpanded to on preprocessing? will the code compile?#include<stdio.h>#define SWAP(a, b, c)(ct; t=a, a=b, b=t)int maino{intx=10, y=20;SWAP(x, y, int);printf(“%d %d\n”, x, y);
Q.32 :-What will the SWAP macro in the following program be expanded to on preprocessing? will the code compile? ... y); return 0; Select the correct answer from above options...
asked
Nov 30, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: what will be the result stored in a and b after evaluating the following assume that a=-4 and b=3a=++b-ab+=a
what will be the result stored in a and b after evaluating the following assume that a=-4 and b=3 a=++b-a b+=a print (a,”,”,b) Select the correct answer from above options...
asked
Dec 12, 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: 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: 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: 2;int iint n92;while(i <= n) {printf(i+” “);i = i + j;j = 1 + 2;
2; int i int n 92; while(i...
asked
Dec 12, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: int x =20, y = 10, z; What is the value of z in z = ++x * (y – –) – y ? Show the steps.
int x =20, y = 10, z; What is the value of z in z = ++x * (y – –) – y ? Show the steps. 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: Choose the final value of c from the following code, when, int a=12, b=13, c=0; c=a+++++a/7+b++; *
Choose the final value of c from the following code, when, int a=12, b=13, c=0; c=a+++++a/7+b++; * Select the correct answer from above options...
asked
Nov 29, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: a,b,c and d are int type, however, the expression is slightly modified as (a+b*c-d)/7.0. What is the resultant data type of the following mathematical expression?
a,b,c and d are int type, however, the expression is slightly modified as (a+b*c-d)/7.0. ... of the following mathematical expression? Select the correct answer from above options...
asked
Dec 19, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
...