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
The time delay of a long-distance call can be determined by multiplying a small fixed constant by the number of communication li
lara [203]

Answer:

The diameter of T is 2k+1.

See explaination for the details

Explanation:

We can compute the diameter of the tree T by a pruning procedure, starting at the leaves (external nodes).

Remove all leaves of T. Let the remaining tree be T1.

Remove all leaves of T1. Let the remaining tree be T2.

Repeat the "remove" operation as follows: Remove all leaves of Ti. Let remaining tree be Ti+1.

When the remaining tree has only one node or two nodes, stop! Suppose now the remaining tree is Tk.

If Tk has only one node, that is the center of T. The diameter of T is 2k.

If Tk has two nodes, either can be the center of T. The diameter of T is 2k+1.

7 0
3 years ago
A router has just received the following new IP addresses: 88.62.108.0/21, 88.62.116.0/21, 88.62.120.0/21 and 88.62.128.0/21. If
Natali [406]

Answer:

Yes, they can be aggregated into a single network address of 88.62.0.0/16

Explanation:

Since they all will be using the same outgoing interface so they can be grouped according to next hop which appears to be the same for all four IP address.

First convert all the network addresses into binary.

DECIMAL                      BINARY                                                      CLASS OF IP

88.62.108.0/21            01011000.00111110.01101100.00000000      Class A

88.62.116.0/21             01011000.00111110.01110100.00000000     Class A

88.62.120.0/21            01011000.00111110.01111000.00000000     Class A

88.62.128.0/21           01011000.00111110.10000000.00000000    class A

Looking at the binary form of the address from left to right it can be observed that all for address are identical in the first two octet, that is up to the 16th digit.

So the new subnet mask will be /16, using any of the four address and the /16 mask will can obtain the new network address

All four address can be summarized as 88.62.0.0/16

4 0
3 years ago
What is closeable interface in java.
alisha [4.7K]

Answer:

A Closeable is a source or destination of data that can be closed. The close method is invoked to release resources that the object is holding (such as open files).

Explanation:

hope it help?

8 0
3 years ago
A peripheral can be used to tell a computer to complete a specific task.<br> A) True <br> B)False
RoseWind [281]

Answer:

A. true

Explanation:

<em><u>because</u></em><em><u> </u></em><em><u>you</u></em><em><u> </u></em><em><u>can</u></em><em><u> </u></em><em><u>complete</u></em><em><u> </u></em><em><u>it</u></em><em><u> </u></em><em><u>without it</u></em><em><u> </u></em><em><u>mistakes</u></em><em><u> </u></em><em><u>if</u></em><em><u> </u></em><em><u>your</u></em><em><u> </u></em><em><u>using</u></em><em><u> </u></em><em><u>an</u></em><em><u> </u></em><em><u>computer</u></em><em><u> </u></em><em><u>but</u></em><em><u> </u></em><em><u>if</u></em><em><u> </u></em><em><u>you</u></em><em><u> </u></em><em><u>use</u></em><em><u> </u></em><em><u>an</u></em><em><u> </u></em><em><u>paper</u></em><em><u> </u></em><em><u>you</u></em><em><u> </u></em><em><u>will</u></em><em><u> </u></em><em><u>make</u></em><em><u> </u></em><em><u>mistakes</u></em><em><u> </u></em><em><u>over</u></em><em><u> </u></em><em><u>and</u></em><em><u> </u></em><em><u>over</u></em>

8 0
3 years ago
18. What do we call the Microsoft Word File?
Colt1911 [192]

Answer:

<h2>we call Microsoft Word File "<u>document</u>" or "<u>docx</u>"</h2>
5 0
2 years ago
Other questions:
  • Design the below using an array// Sunrise Freight charges standard// per-pound shipping prices to the five states they serve// –
    6·1 answer
  • Database management systems _____. a. include transaction-processing reports for database analysis b. are used to create, organi
    6·1 answer
  • D-H public key exchange Please calculate the key for both Alice and Bob.
    12·1 answer
  • Is 37 words per minute when typing an okay grade?
    15·2 answers
  • Which process refers to starting up a computer?
    13·2 answers
  • The figure below shows a black and white image with a resolution of 720×504. Identify how much memory (in bits) will be occupied
    15·1 answer
  • When naming a file to upload into an assignment in blackboard, it is okay to use special characters?
    13·1 answer
  • James gets a job at a multinational corporation. On his first day at work, he finds out that the numerical code assigned by the
    10·1 answer
  • Companies expose themselves to harsh sanctions by federal agencies when they violate the privacy policies that their customers r
    8·1 answer
  • What is web browser <br>​
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!