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
baherus [9]
3 years ago
8

D is the correct answer

Computers and Technology
2 answers:
pogonyaev3 years ago
7 0
For what Question ?
Elina [12.6K]3 years ago
7 0

Answer:

d is very well the correct answer

Explanation:

it its ver y correct

You might be interested in
Write the following function without using the C++ string class or any functions in the standard library, including strlen(). Yo
dolphi86 [110]

Answer:

The function in C++ is as follows

int chkInd(string str1, string str2){    

int lenstr1=0;

while(str1[lenstr1] != '\0'){  lenstr1++;  }

int index = 0; int retIndex=0;

for(int i=lenstr1-1;i>=0; i--){

   while (str2[index] != '\0'){

       if (str1[i] == str2[index]){

           retIndex=1;

           break;         }

       else{   retIndex=0;      }

  index++;    }

  if (retIndex == 0){   return i;   }else{return -1;}}

}

Explanation:

This defines the function

int chkInd(string str1, string str2){    

First, the length of str1 is initialized to 0

int lenstr1=0;

The following loop then calculates the length of str1

while(str1[lenstr1] != '\0'){  lenstr1++;  }

This initializes the current index and the returned index to 0

int index = 0; int retIndex=0;

This iterates through str1

for(int i=lenstr1-1;i>=0; i--){

This loop is repeated while there are characters in str2

   while (str2[index] != '\0'){

If current element of str2 and str1 are the same

       if (str1[i] == str2[index]){

Set the returned index to 1

           retIndex=1;

Then exit the loop

           break;         }

If otherwise, set the returned index to 0

       else{   retIndex=0;      }

Increase index by 1

  index++;    }

This returns the calculated returned index; if no matching is found, it returns -1

  if (retIndex == 0){   return i;   }else{return -1;}}

}

4 0
3 years ago
Which statement best describes the logic in a while loop?bringing an umbrella to determine if it is rainingbringing an umbrella
Murljashka [212]

Answer:

B. If it is raining, bring an umbrella regardless.

Explanation:

Here is the code syntax:

<em>while </em>_ = <em>true</em>

<em> print</em>(rain)

In short words, this syntax is basically saying while a condition is true, do this. "This", is the function run under the true condition. For while loops to work, at least one condition of anything must be true.

  1. Hope this helps!
  2. If that's the case, please give thanks!

5 0
2 years ago
What is the proper order for the fetch-execute cycle?
vesna_86 [32]

Control Unit – controls all parts of the computer system. It manages the four basic operations of the Fetch Execute Cycle as follows:

Fetch – gets the next program command from the computer’s memory

Decode – deciphers what the program is telling the computer to do

Execute – carries out the requested action

Store – saves the results to a Register or Memory

Arithmetic Logic Unit (ALU) – performs arithmetic and logical operations

Register – saves the most frequently used instructions and data

5 0
3 years ago
Importance of project risk management
kkurt [141]
You must spread your risks out like don’t put all your eggs in one basket... don’t rely on on thing because is it goes downhill you have no backup
5 0
4 years ago
Write a program that accepts a whole number as input, multiplies that number by 12, and then outputs the product.
lesya692 [45]

try:

   num = int(input("Enter a number: "))

   print(12*num)

except ValueError:

   print("Please enter a number!")

I wrote my code in python 3.8

6 0
3 years ago
Read 2 more answers
Other questions:
  • The length, height, and width of a cube are 10, 7, and 5 cm respectively. Write a program that calculates the volume, perimeter,
    9·1 answer
  • Variable names may contain spaces and punctuation symbols. True False
    15·1 answer
  • Which choice lists two image formats that support transparency
    6·2 answers
  • What method does a GSM network use to separate data on a channel?
    15·1 answer
  • Which line of code will print I can code on the screen?
    13·1 answer
  • Welcome back to school people!
    15·2 answers
  • Part 1: 1) Write a C program getPhoneNumber.c that accepts a phone number from the user in the form XXX-XXX-XXXX, and then displ
    12·1 answer
  • You would like to find the average of cells C2, C3, and C4. What should the formula look like? = C2+C3+C4*3 =C2+C3+C4/3 =(C2+C3+
    15·2 answers
  • How does the variable scope influence the structure of an algorithm
    7·1 answer
  • What is another name for repetition in programming?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!