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 is the difference between procedural and declarative language?
What is static memory allocation?
write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3
which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above
Why doesnt that code work?
If I have a char * variable pointing to the name of a function ..
How do we open a binary file in Read/Write mode in C?
what is different between auto and local static? why should we use local static?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)
Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.
How is a structure member accessed?
What is the difference between a function and a method in c?
When is a null pointer used?
What is break in c?
hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..