Search:
Forum
General C++ Programming
Help please!
Help please!
Jul 27, 2011 at 6:19pm UTC
Brad1
(19)
What are the values of i and n after this loop executes?
int n = 0;
for (int i=0; i < 4; i++)
{
n = n + 5;
}
Jul 27, 2011 at 6:57pm UTC
Caligulaminus
(201)
costaa is that you?
http://cplusplus.com/forum/general/47634/
http://cplusplus.com/forum/general/47631/
Jul 27, 2011 at 8:38pm UTC
ceruleus
(218)
i = 0 and n = n + 5. duh.
Jul 27, 2011 at 8:52pm UTC
closed account (
zb0S216C
)
i
is popped and
n
is left with 20.
Instead of asking these silly questions, why not use
std::cout << n << std::endl
to find out yourself? Is there really any point in posting a question like this?
Wazzak
Topic archived. No new replies allowed.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs