Determine the code below, tell me exactly how many times is
the operation sum++ performed ?
for ( i = 0; i < 100; i++ )
for ( j = 100; j > 100 - i; j--)
sum++;
Answer Posted / daniel
(99 * 100)/2 = 4950
The sum++ is performed 4950 times.
Is This Answer Correct ? | 7 Yes | 7 No |
Post New Answer View All Answers
What does double pointer mean in c?
How can I write functions that take a variable number of arguments?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode
A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler
Explain what is wrong with this statement? Myname = ?robin?;
Explain the use of keyword 'register' with respect to variables.
Write a program to show the change in position of a cursor using c
cavium networks written test pattern ..
What is array within structure?
What's the difference between constant char *p and char * constant p?
Why is a semicolon (;) put at the end of every program statement?
How can type-insensitive macros be created?
Tell us bitwise shift operators?
Why does everyone say not to use scanf? What should I use instead?