1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
sukhopar [10]
3 years ago
5

What is the best way to locate where my C program gets into an infinite loop

Computers and Technology
1 answer:
Anni [7]3 years ago
5 0
You could put in a printf() statement to print the value of the index into each loop that you have. You can also step through each loop and read EXACTLY what the program is doing. This is a good skill to develop because your mind has a habit of "fixing" small errors that computers don't.

Computers do exactly what they're told to do, not what you want the to do.
You might be interested in
Orphaned data is also created by the way that the hard drive allocates space on the hard drive for information that the user wan
Anika [276]
It think the answer to that question maybe true
8 0
3 years ago
Why does the media play such an important role in our personal freedom? Select 3 options.
Helga [31]

Answer:

It promotes self-expression

It holds the government accountable

It keeps us informed

Explanation:

I got them right Ed

7 0
2 years ago
Write a while loop that lets the user enter a number. The number should be multiplied by 10, and the result assigned to a variab
pentagon [3]

Answer:

#include <stdio.h> // header file inclusion

int main() // main function declaration

{

    int number,product=0; // variable declaration

    while(product<100) // while loop

   {

       scanf("%d",&number); // input a number

       product= number*10; // multiply the number by product

       printf("%d\n",product); // print the value of product

   }

 return 0; // return statement

}

Output:

  • If the user enter 10 then the loop terminates for the first time and the output is 100.
  • If the user enter 5,10 then the loop executes in 2 times and the output is 50 and 100.

Explanation:

  • Firstly there is an inclusion of header file which understands the meaning of printf() and scanf() function.
  • Then there is the main() function definition
  • Then we declare a two-variable (number and product) of integer type.
  • Then we define a while loop and check the condition that product value is less than 100 or not.
  • Then we take input and multiply by 10.
  • Then we assign the value in the product and print the product value.
6 0
3 years ago
How do I install free premium iOS apps?
Wittaler [7]

Answer:

you go to the ios store

Explanation:

5 0
3 years ago
What is a good principle to implement when you find yourself attempting to
Maurinko [17]

its less is more A

to much could make it really bad

5 0
4 years ago
Other questions:
  • The set of specific, sequential steps that describe exactly what a computer program must do to complete the work is called a(n)
    10·2 answers
  • Wi-Fi is all around us. Is there any downside to its pervasiveness?
    11·1 answer
  • What should you keep in mind when installing hard drives?
    5·1 answer
  • Could someone tell me what this means in python? Thanks
    6·1 answer
  • Given the following code fragment, how many times does the loop body execute? int laps = 50; int myNum = 1; do { myNum = myNum +
    9·1 answer
  • Create a goal seek analysis to determine what the price should be to generate demand of 2,625,000 tablets given that the supplie
    10·1 answer
  • Write a C++ program that reads a temperature value and the letter C for Celsius or F for Fahrenheit. Print whether water is liqu
    14·1 answer
  • Choose the term described. : a value that can be passed to a function
    9·1 answer
  • What is it called when a programmer includes a step in an algorithm that lets
    5·1 answer
  • Electronic hacking and illegal trespassing for the purposes of acquiring a competitor’s proprietary information is considered.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!