What value will the variable total have after execution of t

What value will the variable total have after execution of the following code? int i =-4, total = 2; do {total * = i; i ++;} while(i 7 && d 20 c > 0 && d 15 c 16 && c > 7 c 14 && d

Solution

Answers

(1)

#include <iostream>

using namespace std;

int main()

{

   cout << \"Hello World\" << endl;

   int i = 4;

   int total = 2;

    do {

        total*= i;

        i++;

    } while(i<0);

    cout<<total;

    return 0;

}

(e) None of these above

(2) The code between pair of curly braces in a program is

(e) block

(3) Based on the order of operations with c=4 and d =14

(b) c>0 && d<5 || d>15

(4) what does the following print

#include <iostream>

using namespace std;

int main()

{

  int e =3;

    while(e<=5) {

        cout<< ++e <<\" \";

    }

    return 0;

}

(d) 4 5 6

(5) After a value is returned from a called function ,program control reverts to the

(a) called function

(6) The value returned by a called function is ---- convert to the data type declared the function declaration

(d) sometimes

(7) (c) static

(8)

#include <iostream>

using namespace std;

int main()

{

    int i,j;

    for (i=1;i<=3;i++){

        for(j=5;j>2;j=j-2){

            cout<<\"Hello \";

        }

    }

    return 0;

}

(8) (c) 6

(9) (c) some

(10) (e) 0,1

 What value will the variable total have after execution of the following code? int i =-4, total = 2; do {total * = i; i ++;} while(i 7 && d 20 c > 0
 What value will the variable total have after execution of the following code? int i =-4, total = 2; do {total * = i; i ++;} while(i 7 && d 20 c > 0

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site