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
andreyandreev [35.5K]
3 years ago
6

Explain how for loops can be used to work effectively with elements in an array?

Computers and Technology
1 answer:
tresset_1 [31]3 years ago
7 0

Explanation:

There are three types of loops in programming languages which are as following:-

  1. for.
  2. while.
  3. do while.

The syntax for all the three loops is different.You will see mostly for loop used with the arrays because they are easy to implement.

the syntax of for loop is :-

for(int i=initial value;condition;i++)

{

body

}

In for loops you only have to write the conditions in only line else is the body of the loop.

for example:-

for array of size 50 printing the each element

for(int i=0;i<50;i++)

{

   cout<<arr[i]<<" ";

}

You have to initialize i with 0 and the condition should be i<size of the array and then increase the counter.

You might be interested in
A _________, such as apple.com and whitehouse.gov, uniquely identifies a site and a brand on the web.
Serga [27]

A <u>domain name </u>such as apple.com and whitehouse.gov, uniquely identifies a site and a brand on the web.

What is Domain name?

This is known to be a kind of Application programming interface. The  domain name is said to be a series or a string of letters that tells more about a realm of administrative autonomy.

It  tells about authority as well as control that is found  within the Internet. Domain names are said to be used in a lot of networking contexts and therefore, A <u>domain name </u>such as apple.com and whitehouse.gov, uniquely identifies a site and a brand on the web.

Learn more about Domain name from

brainly.com/question/13153286
#SPJ1

5 0
2 years ago
Please write down your student id. take the last digit of your student id as m.
solmaris [256]
Now why in the world anyone would want to do that....



Really!!!!
7 0
3 years ago
A sandbox is known as a holding area for website or .
Bingel [31]

Answer:

blog

Explanation:

7 0
3 years ago
Read 2 more answers
What naming scheme identifies the rows in a worksheet?
masha68 [24]
The naming scheme that identifies the rows in a worksheet is B. 1, 2, 3.
Rows are horizontal, and they are identified by numbers in an Excel worksheet. On the other hand, columns are vertical, and they are identified by letters in the same Excel worksheet. 
7 0
3 years ago
Read 2 more answers
What is the most important thing you should avoid when you store files and folders?
iVinArrow [24]
Getting hacked by someone
4 0
3 years ago
Other questions:
  • Create a class named CollegeCourse that includes the following data fields: dept (String) - holds the department (for example, E
    5·1 answer
  • Sarah believes that thanks to the ability of science and technology to create progress problems will be solved and life will imp
    11·1 answer
  • Determine which careers you can enter after completing a training program and which careers require a college degree.
    6·1 answer
  • Write a program that: Takes the list lotsOfNumbers and uses a loop to find the sum of all of the odd numbers in the list (hint:
    5·1 answer
  • Answer this crossword for brainliest and 15 points
    9·1 answer
  • Which of these number formats would you want to apply to a cell showing the total sales for the month? Currency, Number, or Perc
    10·2 answers
  • What does this mean? And how did I get it?
    12·2 answers
  • Electronic evidence on computer storage media that is not visible to the average user is called​ ________.
    14·1 answer
  • When you use the predict step in the IPDE process you
    8·1 answer
  • Continue your S3 and S4 assignment for a young soccer league with the following specification. Do not include the previous queri
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!