What is the value of donuts after the following code executes?
int donuts = 10;
if (donuts = 1)
donuts = 0;
else
donuts += 2;
A) 12
B) 10
C) 0
D) 1
Correct Answer:
Verified
Q21: This operator is known as the logical
Q26: In C++ the = operator indicates:
A)equality
B)assignment
C)subtraction
D)negation
E)None of
Q27: These operators connect two or more relational
Q28: What is the value of the following
Q28: What is the value of the following
Q30: What will the following segment of
Q31: What is the value of the following
Q34: The _ of a variable is limited
Q35: Given that x = 2, y =
Q42: When a program lets the user know
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