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
klio [65]
3 years ago
13

Which statements about the enhanced for loop are true for arrays of primitive data? I. It is suitable for all array algorithms.

II. It does not allow the contents of the array to be modified. III. It does not require the use of an index variable.
Computers and Technology
1 answer:
Anna [14]3 years ago
7 0

Answer: III

Explanation: An enhanced for loop is the foreach equivalent in .NET, you do not require a index variable.

E.x

Foreach(string str in foo[100]){ // prints all 100 strings in foo, one by one.

   Console.WriteLine(str);

}

You might be interested in
A binary search algorithm is written (as in the modules, for example) which searches a pre-sorted array for some user-defined va
Mazyrski [523]

Answer:

c) it will always return with an answer of 7 or fewer comparisons of data.

Explanation:

As maximum number of comparison in worst case for sorted binary search is log₂n, here n = 100, so maximum search is at least 6.6 which is approximately 7.

4 0
3 years ago
Displays information a bout drivers, network connections, and other program-related details.
slava [35]

Answer:

library

Explanation:

hope you like it

6 0
3 years ago
Write a script that prints the multiples of 7 between 0 and 100. Print one multiple per line and avoid printing any numbers that
Sedbober [7]

Answer:

The program to this question can be described as follows:

Program:

#include <iostream> //defining header file

using namespace std;

int main() //defining main method

{

int x; //defining integer variable

for(x=0;x<=100;x++) //defining loop to count value from 0 to 100

{

   if(x%7==0) //check value is divisable by 7

   {

       cout<<x<<endl; //print value

   }

}

   return 0;

}

Output:

please find the attachment.

Explanation:

In the above code, an integer variable x is declared, which is used in the for loop, in this loop variable  "x" starts from 0 and ends when the value of x is less than and equal to 100.

  • Inside the loop an, if block is used that defines a condition that is (i%7==0), it will check, that the value is divided by 7.
  • In this loop, a print method is used, that prints its values.

8 0
3 years ago
What is computer and example<br>​
otez555 [7]
Computer
a machine that processes information under the control of a program

Example(s)
(First Electronic Computer) The Electronic Numerical Integrator and Computer (ENIAC)
PC (Personal Computer)
Desktop
Laptop



Hope this helps!
7 0
2 years ago
You are searching for an item in an array of 40,000 unsorted items. The item is located at the last position. How many compariso
irina [24]
It depends on what algorithm you’re using.
If you’re going item by item, you’ll be looking at O(n) or O(40000)
Give me a reply if you want to know more, such as if you did binary search what the Big O notation is
4 0
2 years ago
Other questions:
  • A user deletes a message from a mailbox while on a desktop. What happens to the email message on the user's synchronized devices
    13·2 answers
  • Naruto Uzumaki who likes naruto ??? who waches it??
    14·2 answers
  • Call 334-399-4201 to annoyed my mom
    13·1 answer
  • Howard is leading a project to commission a new information system that will be used by a federal government agency. He is worki
    7·1 answer
  • A researcher plans to identify each participant in a certain medical experiment with a code consisting of either a single letter
    10·1 answer
  • #Write a function called hide_and_seek. The function should #have no parameters and return no value; instead, when #called, it s
    7·1 answer
  • What is wrong with this code and correct it.
    12·1 answer
  • Raw materials have two basic types what are the 2?
    11·2 answers
  • Which bits of the address would be used in the tag, index and offset in a two-way set associative cache with 1-word blocks and a
    7·1 answer
  • I will give brainyest
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!