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
Isa wants to find out if his co-worker Alexis is available for an event on Wednesday, February 10th. Which calendar
Elena-2011 [213]
Appoint view
Hope this helps
7 0
3 years ago
Plzz help will mark brainliest
vlabodo [156]

Answer:

11. 3 dimensions

12. ( i believe its number 3)

13. 2 option

14. Natural Light

15. Development

Explanation:

7 0
3 years ago
What is the output of the following query? SELECT INSERT ('Knowledgeable', 5, 6, 'SUPER');
Scrat [10]

Answer:

The above query gives an error.

Explanation:

  • The query gives an error because is not the correct syntax of the select or inserts query.
  • The syntax of the select query is as follows: "select Attributes_1_name, Attributes_2_name,...., Attributes_n_name from table_name;".
  • The syntax of the insert query is : "insert into table_name (column_1_name, column_2_name,...,column_n_name) values (column_1_value, column_2_value,...,column_n_value);".
  • The syntax of the insert and select query is : "insert into table_name (select Attributes_1_name, Attributes_2_name,...., Attributes_n_name from table_name);".
  • But the above query does not satisfy any property which is defined above. Hence it gives a compile-time error.
6 0
3 years ago
You've formatted the first paragraph of a document. What button can you use to apply the formatting from the first paragraph to
julia-pushkina [17]
All formatting for a paragraph is stored in the paragraph mark and carried to the next paragraph when you press the Enter<span> key. </span>
6 0
3 years ago
Copycat crime is the spectacle of performing acts of crime and deviance in order to record, share, and upload them to the Intern
babymother [125]

Answer:

The statement is false.

Explanation:

  • The copy cat crime is the criminal act that is performed or modeled by inspiring from the previous crime.
  • The example of copy cat crime is : "Breaking Bad", it has been recorded that many youths followed the crime that has been executed by Mr. white and Jessy Pinkman on that TV show.
  • So inspiring form that TV series if any one attempts to do that crime then it is known as the copy cat crime.
4 0
3 years ago
Other questions:
  • Jacob is a teacher and wants to sort his grades based on Test 1 and then on Test 2.
    14·2 answers
  • A typical serial cable has
    13·1 answer
  • How to find i with superposition method
    8·1 answer
  • Select the Navy Admiral who invented a high-level programming language FLOW-MATIC in 1953.
    7·1 answer
  • Consider the conditions and intentions behind the creation of the internet—that it was initially created as a tool for academics
    12·1 answer
  • How to shutdown a computer by step by step​
    5·2 answers
  • What security weaknesses/vulnerabilities exist in Wireless local area network device hardware and software?
    10·1 answer
  • Where to get industrial circuits far cry 6
    8·1 answer
  • Which of the following tabs on the Ribbon contains the command to add a Quick Part to a document? A Design B Insert C View D Hom
    7·1 answer
  • A timer is set after each frame is sent before waiting an ACK for that frame, how long does the timer take to be expired?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!