menu
Qamnty
Login
Register
My account
Edit my Profile
Private messages
My favorites
What is sum after the following loop terminates? int sum = 0; int item = 0; do { item ; sum = item; if (sum > 4) break; } while (item < 5);
Ask a Question
Questions
Unanswered
Tags
Ask a Question
What is sum after the following loop terminates? int sum = 0; int item = 0; do { item ; sum = item; if (sum > 4) break; } while (item < 5);
asked
Sep 27, 2018
36.1k
views
3
votes
What is sum after the following loop terminates? int sum = 0; int item = 0; do { item ; sum = item; if (sum > 4) break; } while (item < 5);
Computers & Tech
high-school
Deovandski
asked
by
Deovandski
7.6k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
2
Answers
6
votes
Sorry i don’t know the answer
Kirschstein
answered
Sep 30, 2018
by
Kirschstein
8.6k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
4
votes
int sum = 0;
int item = 0;
do
{
item;
sum = item;
if (sum > 4)
break;
} while (item < 5);
You will generate a compile error, as having (item;) as a statement on its own is invalid.
Simonluca Landi
answered
Oct 1, 2018
by
Simonluca Landi
7.5k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
← Prev Question
Next Question →
Related questions
asked
Jan 19, 2024
176k
views
Give the following code, where x = ), what is the resulting value of x after the for-loop terminates? for (int i = 0; i < 5; i++) x =+ 1; A) 4 B) 10 C) 0 D) 15 E) 5
James Koppel
asked
Jan 19, 2024
by
James Koppel
7.2k
points
Computers & Tech
high-school
1
answer
1
vote
176k
views
asked
Jan 1, 2024
216k
views
If x is an int where x = 1, what will x be after the following loop terminates? while (x < 100) x *= 2; A) 128 B) 2 C) 64 D) 100 E) none of the above; this is an infinite loop
Tapy
asked
Jan 1, 2024
by
Tapy
8.4k
points
Mathematics
high-school
1
answer
1
vote
216k
views
asked
Apr 15, 2017
64.6k
views
Write a statement that terminates the current loop when the value of the int variables x. and y.are equal
Todd Brooks
asked
Apr 15, 2017
by
Todd Brooks
8.5k
points
Computers & Tech
high-school
1
answer
1
vote
64.6k
views
Ask a Question
Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.
Categories
All categories
Mathematics
(3.7m)
History
(955k)
English
(903k)
Biology
(716k)
Chemistry
(440k)
Physics
(405k)
Social Studies
(564k)
Advanced Placement
(27.5k)
SAT
(19.1k)
Geography
(146k)
Health
(283k)
Arts
(107k)
Business
(468k)
Computers & Tech
(195k)
French
(33.9k)
German
(4.9k)
Spanish
(174k)
Medicine
(125k)
Law
(53.4k)
Engineering
(74.2k)
Other Questions
The book shows how to add and subtract binary and decimal numbers. However, other numbering systems are also very popular when dealing with computers. The octal (base 8) numbering system is one of these.
Seven basic internal components found in a computer tower
describe an advance in technology that makes life more enjoyable. what discoveries contribute to this technology?
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search Qamnty