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
Scilla [17]
3 years ago
5

When breaking a problem down, you often encounter elements that you want to use repeatedly in your code. Sometimes it's appropri

ate to write a new function; at other times it's appropriate to write a loop. There is no hard-and-fast rule as to which is better, but what do you think? What kinds of circumstances would lead you to writing a function versus using a loop?
Computers and Technology
1 answer:
ddd [48]3 years ago
8 0

<u>Answer:</u>

<em>FUNCTION:</em>

  • A function does not require the number of times that the <em>code script needs to be executed </em>
  • When we go for large programming, ie. while creating projects, we can invoke function from one file to another based on the access <em>specifier mentioned for the function. </em>
  • There is a stack call created in the memory whenever a <em>function is called. </em>

<em>LOOP :</em>

  • Whereas the number of times that the loop has to be <em>executed must be defined </em>
  • A loop cannot be called, it can be used only the code block in <em>which it is present. </em>
  • There is not overhead of creating a stack since it is not invoked and there is no <em>transfer of control from one module to another </em>

You might be interested in
Which unit of the computer works as the input​
PolarNik [594]

Answer:

Center Processing Unit ....

4 0
3 years ago
1
g100num [7]
Have a look at the man page for printf:

man 3 printf
4 0
3 years ago
Read 2 more answers
A pointing device used mainly for computer games is known as
kolbaska11 [484]

Answer: Joystick is the only one that makes sense, a stylus and digitizer are both used on drawing tablets, not computer games.

5 0
2 years ago
These factors influence the design of a network.
REY [17]
Availability ,devices and applications, performance, security, scalability.
8 0
2 years ago
Read 2 more answers
Comments should
suter [353]

Answer:

Correct answer is:

communicate the purpose of the code that follows it.

Explanation:

Let have a look at each option

comment should give the reader the background of the programmer.

Comments are unable to do so.

Be written on every line

No, it is not need as comment are useful only to explain difficult or complex part of code.

communicate the purpose of the code that follows it.

yes, this option is true, as comments will give hints to programmer about the piece of code.

give information about how many hours it took to write the code

No, comments can answer it,

3 0
2 years ago
Read 2 more answers
Other questions:
  • The equipment that processes data in order to create information is called the _______.
    8·2 answers
  • You are given a data set with information from 1,000 high school students (of which the following is a part of the data) and ask
    6·1 answer
  • ____ software is rights-protection software used to control the use of a work.
    9·1 answer
  • Why are you unable to modify the budget file, when you have the allow full control ntfs permission?
    5·1 answer
  • Anyone got the edmentum computer programming post test answers?
    6·1 answer
  • 4. UPS stands for Uninterrupted Power Supply . (Yes /no
    11·1 answer
  • TOT al<br>Name TWO examples of these settings and utilities. (2)​
    12·1 answer
  • Consider the following code:
    6·1 answer
  • Which of the following tips for using social network will help you keep your job
    12·1 answer
  • Why computer known as tool of information​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!