Suppose sum,num,and j are int variables,and the input is 4 7 12 9 -1.What is the output of the following code?
cin >> sum;
Cin >> num;
For (j = 1; j <= 3; j++)
{
Cin >> num;
Sum = sum + num;
}
Cout << sum << endl;
A) 24
B) 25
C) 41
D) 42
Correct Answer:
Verified
Q4: What is the next Fibonacci number in
Q21: Which of the following is a repetition
Q22: What is the value of x after
Q26: The function eof is a member of
Q29: _ loops are called posttest loops.
A) break
B)
Q30: When a continue statement is executed in
Q30: A for loop is typically called a
Q31: Which of the following loops is guaranteed
Q35: To generate a random number, you can
Q39: Which of the following loops does not
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents