answersLogoWhite

0

The value of count should be more than max range of the for-loop.

e.g.

for (index=0;index<n;index++) ....In this case the count (i.e. index) would be more than "n" which is max-range.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Can break statement used in the forloop?

Sure. (You could have tried it yourself.)


What is forloop?

For loop is utilize to do any specific work for specific number of times For example to print hello on computer screen 10 time we use For (start = 1; end = 10; start++) count&lt;&lt;"hello"; next


What constant is in c?

constant is a fixed value that do not changed during execution constant is a fixed value that do not changed during execution


What is the value of an original photo of Mussolini's execution?

value of mussolinis war photos


What does the count minus minus in java mean?

In Java, the expression count-- is a post-decrement operator. It decreases the value of the variable count by 1, but it returns the original value of count before the decrement. This means that if you use count-- in an expression, you will get the value of count prior to it being decremented. For example, if count is 5, using count-- will yield 5 in the current expression, but afterwards, count will be 4.


Difference between numeric constants and numeric variables in qbasic?

A constant is not supposed to change during program execution. A variable may change, in the sense that you assign a value, then another value, then another...A constant is not supposed to change during program execution. A variable may change, in the sense that you assign a value, then another value, then another...A constant is not supposed to change during program execution. A variable may change, in the sense that you assign a value, then another value, then another...A constant is not supposed to change during program execution. A variable may change, in the sense that you assign a value, then another value, then another...


How can you write a c program using while loop that will print first ten odd numbers?

#include&lt;stdio.h&gt; int main () { int odd=1; int count=0; while (count++&lt;10) { printf (%d\n", odd); odd+=2; } return 0; }


WHAT IS THE name that represents a value that cannot be changed during the program's executiON?

A constant is a name that represents a value that cannot be changed during the program's execution. Constants are typically assigned a value when declared and cannot be reassigned or modified while the program is running.


Write a pseudocode statement that assigns the value 27 to the variable count?

count := 27


How do you write an if-else statement that increments the value of count by 1 if the value of total is evenly divisible by four or five and increments the value of count by 2 otherwise?

Here's a code snippet that solves that problem. if((total%5==0) (total%4==0)) { count += 1; } else { count += 2; }


What Preselected value that stops the execution of a program?

A preselected value that stops the execution of a program is often referred to as an &quot;exit code&quot; or &quot;exit status.&quot; This value is typically set to indicate an error or a specific condition under which the program should terminate, with common values being 0 for success and non-zero values for various errors. When the program encounters this exit code, it halts execution and returns control to the operating system or calling process, signaling the outcome of the execution.


Does an ace count as a one in poker when determining the value of a hand?

Yes, in poker, an ace can count as a one when determining the value of a hand, such as in a straight where the ace can be low.