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
iren [92.7K]
3 years ago
10

A foreach statement can be used in place of the for statement whenever code looping through an array requires "access" to the co

unter. True or False?
Computers and Technology
1 answer:
Ede4ka [16]3 years ago
5 0

Answer:

False

Explanation:

Foreach is useful when we want to do something for each element rather than repeating something for  n times

Answer is False

You might be interested in
The document that is use in excel to store an work with data that's formatted in a pattern of a uniformly space horizontalal an
Neporo4naja [7]

Answer:

Spreadsheet.

Explanation:

Microsoft Excel is a software application or program designed and developed by Microsoft Inc., for analyzing and visualizing spreadsheet documents.

The document that is use in excel to store a work with data that's formatted in a pattern of uniformly spaced horizontalal and vertical lines is called a spreadsheet.

A spreadsheet can be defined as a file or document which comprises of cells in a tabulated format (rows and columns) typically used for formatting, arranging, analyzing, storing, calculating and sorting data on computer systems.

Additionally, workbooks are known as Microsoft Excel files. An Excel workbook can be defined as a collection of one or more charts and worksheets (spreadsheets) used for data entry and storage in an excel file. In order to create a project on Excel you will have to use a workbook.

5 0
3 years ago
Give an example of an if/else statment and a case statment that are equivalent. Your example should contain at least three choic
zimovet [89]

Answer:

The if - else and equivalent switch case statements in c++ language are given below.

if ( ch == 1 )

       cout << " sum is " << x + y << endl;

   else if ( ch == 2 )

       cout << " difference is " << x - y << endl;

   else if ( ch == 3 )

   {

       cout << " Quitting " << endl;

       exit;

   }

switch( ch )

   {

       case 1 :    cout << " Sum is " << x + y << endl;

                   break;

       case 2 :    cout << " Difference is " << x - y << endl;

                   break;

       case 3 :    cout << " Quitting " << endl;

                   break;

   }      

Explanation:

The above statements use three variables which are declared and initialized as shown.

int x = 10;

    int y = 25;

    int ch;

The above statements execute for of addition, subtraction or to quit the program.

cout << " 1. Addition " << endl;

    cout << " 2. Subtraction. " << endl;

    cout << " 3. Quit " << endl;

    cout << " Enter your choice " << endl;

The variable ch holds the numerical option entered by the user.

    cin >> ch;

For if - else statements, the if statement is executed based on the value of variable ch entered by the user. After execution, the compiler goes out of the statements automatically.

Following the if – else, if any statement is present, it will be executed.

For switch case, every case ends with break keyword. After the required case is executed based on the value of variable ch entered by the user, the break statement is executed which causes the switch case to terminate the control goes out of the statements.

Following the switch case, if any statement is present, it will be executed.

4 0
3 years ago
Which of the following defines what privacy policy is?
Anna11 [10]

Answer:

c

Explanation:

b is a terms of service

8 0
3 years ago
Read 2 more answers
When should else be used in programming?
Mandarinka [93]

Explanation:

The else statement is usually used when computations are still required when a condition is not met in an if and else-if statement, so the correct option is the fourth one: "to describe what should happen when the condition of an if statement isn't met".

Hope this helps :)

7 0
3 years ago
Read 2 more answers
Your desktop computer monitor is not displaying a picture. What would you do to troubleshoot the problem?
vichka [17]
I would have to say B but if you don't fell like thats the answer then A I'm not 100% sure
4 0
3 years ago
Read 2 more answers
Other questions:
  • What does the security element of non-repudiation mean in e-commerce cybersecurity? A. Data needs to be available at all times.
    10·1 answer
  • The house had a wonderful pool of ... (his/its/our) own.​
    5·1 answer
  • 1. A formula =A1+B2 is in cell D8. If you copy that formula to cell D9, what is the new formula in cell D9?
    7·1 answer
  • All of the following are examples of roadblocks to achieving a goal except
    12·2 answers
  • Formulate it as a tree search problem.
    15·1 answer
  • The options are file protection , fault-tolerance , fault line , file tolerance , and the question is which term describes the d
    6·1 answer
  • What is the value of the variable answer after the following code is executed?
    10·1 answer
  • Which of the following is the most accurate definition of a botnet? a small text file passed to a Web browser on a user's comput
    15·1 answer
  • Targeted advertising, in which advertisements are shown to individuals based on past purchases, web searches or other demographi
    9·1 answer
  • Help me with this someone hurry due in 8 mins
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!