in Education by
m 1) Int a=0.b=20; for (int i=20;i>=4;i=i-3) { if(i%21=0 a=a+2; ) b=b+a: predict the value of b after execution Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
Answer: a= 0, b = b + 0 = 20 + 0 = 20 Explanation: loop start from 20 which smaller than 21 so that’s why condition is always false. No change in the value of a….

Related questions

0 votes
    Int a=0.b=20: for (int i=20:i>=4:i=i-3) { if(i%2!=0) a=a+2: 3 b=b+a: . Select the correct answer from above options...
asked Nov 27, 2021 in Education by JackTerrance
0 votes
    int fun(int n) { if(n!=0) { return n – fun(n-5); } else { return n; } } int main(){ int n = 20, z; z = fun(n); printf(“%d”, z); } Select the correct answer from above options...
asked Dec 31, 2021 in Education by JackTerrance
0 votes
0 votes
    { int ar[] = { 3, 1, 4, 6, 5 }; int ar_size = sizeof(ar) / sizeof(ar[0]); isTriplet(ar, ar_size) ? cout...
asked Dec 3, 2021 in Education by JackTerrance
0 votes
0 votes
    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
0 votes
    int find(int i) { if(>1) j=find(j/10)+(j%10) else j=0; return j; void main() int i=1000 int k k=find(i): printf(“%d”, K) Select the correct answer from above options...
asked Dec 29, 2021 in Education by JackTerrance
0 votes
    int find(int j) { if(>1X j=find(j/ 10)+(%10); } else { j=0; return j; void main() int i=1000, int k; k=find(i); printf(“%d”, k); Select the correct answer from above options...
asked Dec 29, 2021 in Education by JackTerrance
0 votes
    Cell A1 contain the number 20 and B1 contain 3. What will be the content of cell C1, if the formula = A1 + ... is entered in cell C1? Select the correct answer from above options...
asked Nov 29, 2021 in Education by JackTerrance
0 votes
    >>> list(range(0, -9,-1)) will print [-1, -2, -3, -4,-5, -6, -7, -8) [0,-1, -2, -3, -4,-5, -6, -7, -8 ... [0,-1, -2, -3, -4,-5, -6, -7] Select the correct answer from above options...
asked Dec 28, 2021 in Education by JackTerrance
0 votes
    Plz write a program for the following pattern in Java class 10 ICSE 2 6 12 20 30 42 4 6 8 10 12 2 2 2 ... spam. Answer only if you know Select the correct answer from above options...
asked Nov 30, 2021 in Education by JackTerrance
...