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
Which of the following are characteristics of a cell
olganol [36]

Answer:

-occurs at the intersection of columns and  rows

-is a single unit for entering data on a  spreadsheet

-is located according to its cell reference or  cell address

Explanation:

A cell is a box in a spreadsheet program that contains information and each cell is identified using a cell reference that indicates the colum letter followed by the row number where the cell is located. So, according to this, the characteristics of a cell in a spreadsheet software are:

-occurs at the intersection of columns and  rows

-is a single unit for entering data on a  spreadsheet

-is located according to its cell reference or  cell address

5 0
3 years ago
The User Datagram Protocol (UDP) is called the connectionless protocol because: It does not attempt to fix bad packets but resen
DochEvi [55]

Answer:

The User Datagram Protocol (UDP) is called the connectionless protocol because:

It does not attempt to fix bad packets or resend lost packets.

Explanation:

Ports are openings or entrance doors through which data packages have access to a PC or server.  TCP and UDP are transport protocols with port numbers.  TCP means Transmission Control Protocol.  They are used to connect two devices over the internet and other networks.  UDP means User Datagram Protocol.  They are used to connect applications and to speed the transfer of data.  Comparatively, UDP is faster, simpler, and more efficient than TCP.  TCP enables retransmission of lost data packets, which UDP cannot do.

4 0
2 years ago
T<br> F<br> 5.<br> You can save presentations in PDF and XPS formats.
S_A_V [24]
True, presentations can be saved as PDF’s it will come out as separate pages though
7 0
3 years ago
I am trying to code a lifting simulator game on ro-blox. These problems listed in the third picture tells you the problems. If y
Andru [333]
I have no idea but keep grinding
7 0
3 years ago
When Hallmark designs its website so that a teenage girl can send a theme card to her boyfriend's cell phone, what is the primar
padilas [110]

Answer:

Hallmark is using the Age segmenting dimension.

Explanation:

Most businesses and organizations tend to understand their customers, that is, their behaviors on purchases.

There are 7 important ways businesses segment their customers. They are:

  1. Income
  2. Age
  3. Gender
  4. Acquisition Path
  5. First purchase
  6. Geography
  7. Device type

In our scenario, Hallmark is using the Age segmenting dimension because they can identify that its a teenage girl that is sending theme card to her boyfriend's cell phone.

7 0
2 years ago
Other questions:
  • how to make assignment on power point plz cntct me and help me all about power point and my assignment is prime ministers of pak
    13·1 answer
  • Two powerboats are about to cross paths. what should the boat on the starboard (right) do?
    11·1 answer
  • Blank are back and forth movement of matter that create sound​
    15·1 answer
  • (3 points) Write a program to process two large chunks of data (e.g., a large 3D array and an array of self-defined structures w
    11·2 answers
  • Gimme Shelter Roofers maintains a file of past customers, including a customer number, name, address, date of job, and price of
    8·1 answer
  • Give an explanation of one network connection (it will every helpful​
    13·1 answer
  • The current annual interest rate is 5 percent, and you are taking out a 20-year loan with a monthly end-of-month payment. If you
    5·1 answer
  • A group of two or more computer systems linked together via communication devices is called:.
    10·1 answer
  • When Brittany practiced her presentation, she gave a trusted adult a presentation checklist to use to critique her each time she
    15·1 answer
  • Both IT professionals and governments must apply ethical principles to certify that emerging technologies are to society.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!