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
Zina [86]
3 years ago
10

SOLVE IN C:

Computers and Technology
1 answer:
RSB [31]3 years ago
4 0

Answer:

#include <stdio.h>

#include <string.h>

int main(void) {

  char simonPattern[50];

  char userPattern[50];

  int userScore;

  int i;

  userScore = 0;

  scanf("%s", simonPattern);

  scanf("%s", userPattern);

  for(i = 0;simonPattern[i]!='\0';i++){

         if(simonPattern[i]!=userPattern[i]){

            userScore=i;

            break;

     }

  }

  printf("userScore: %d\n", userScore);

  return 0;

}

Explanation:

  • Use a for loop that runs until it does not reach the end of simonPattern.
  • Check whether the current index of simonPattern and userPattern are not equal and then assign the value of i variable to the userScore variable and break out of the loop.
  • Finally display the user score.
You might be interested in
This Is My Humor 0w0
son4ous [18]

Answer:

yes

Explanation:

OwO

6 0
3 years ago
Type the correct answer in each box. Spell all words correctly.
LUCKY_DIMON [66]

Answer:

View or Remove/Take.

Explanation:

State police are not allowed to view your data without a search warrant.

5 0
3 years ago
If you inadvertently delete a file, you may be able to retrieve it from the A. Drop Box. B. System Restore. C. Restore File. D.
Natalka [10]
D- Recycle Bin is the answer
6 0
3 years ago
What is the term for the error caused when one end of an unshielded twisted-pair (UTP) cable is terminated in the T568A configur
FinnZ [79.3K]

Answer:

A transposition is the correct answer.

Explanation:

A transposition is the type of encryption that caused when one side of the unshielded twisted pair cable is finished in the configuration of  T568A and at the other side of the configuration of T568B, it is also termed as error or cipher. So, that's why the following answer is true.

7 0
3 years ago
Need help with these
Otrada [13]

<em>10:</em> A

<em>~~~~~~~~</em>

<em>11:</em> D

<em>~~~~~~~~</em>

<em>12: </em>A

<em>~~~~~~~~</em>

Hope this helps! :)

3 0
4 years ago
Other questions:
  • How do you train a computer to recognize your voice?
    14·2 answers
  • An _____ is a set of directions for carrying out a task.
    14·1 answer
  • Which of the following means to find and fix errors in code?Which of the following means to find and fix errors in code?
    5·1 answer
  • Wireless data networks are particularly susceptible to known ciphertext attacks.
    10·1 answer
  • Holly has at most $828 to spend for moving from her old apartment. The moving company charges $80 per hour plus at rate of $300.
    9·1 answer
  • Sorry but, what are brainliest for?
    7·2 answers
  • You work for a retail clothing chain whose primary outlets are in shopping malls and are conducting an analysis of your customer
    13·1 answer
  • In the U.S. fuel efficiency of cars is specified in miles per gallon (mpg). In Europe it is often expressed in liters per 100 km
    12·1 answer
  • 1) Write a statement that defines an array of four integers named miles. The array should be initialized with the values 1, 5, 9
    5·1 answer
  • Computing devices translate digital to analog information in order to process the information
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!