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
oee [108]
3 years ago
6

With an example in each, describe the use of two basic functions which are known by the "string.h" header file.

Computers and Technology
1 answer:
olga nikolaevna [1]3 years ago
5 0

Answer:

strcmp(char * A, char * B);

strcat(char * A, char * B)

Explanation:

One of these basic functions is the function strcmp(char * A, char * B).

This functions compares if two strings are equal; If they are, it returns 0. If not, it returns 1;

So, an example:

char A[13] = "Buffalo Bills";

char B[13] = "Buffalo Bills";

if (strcmp(A,B) == 0)

printf("The strings are the same\n);

else

printf("The strings are not the same");

In this case, they are the same.

----------------------

If for example:

char B[13] = "Buffalo Billz"

It would fall in the else, A and B would not be the same strings.

--------------------------

Other function is the strcat(char * A, char * B);

This function takes two strings as an input, and concatenate them to the first.

For example:

char A[15] = "Buffalo";

char B[5] = "Bills";

strcat(A, B);

printf("%s\n", A);

The output is:

Buffalo Bills

You might be interested in
What is a distraction that you find when photographing animals at the zoo
yaroslaw [1]

D. All of the above.

<u>Reason:</u>

A. Fences can get in the way of a beautiful picture.

B: The animal's enclosure may be hard to get the perfect snap. Like a rock can be in the way of the animal. idk...lol

C. People want to see the animal as much as you do so they may block the way of a picture.

Example from Google..XD


7 0
3 years ago
Sharon is thinking about opening a bakery. She knows she wants to set her own hours, reduce her stress and make a profit. But sh
kondaur [170]
C would not be a beginner move.

hope it helps
6 0
3 years ago
A network administrator manages a network with 75 servers. At least twenty of those servers are approaching end of life but the
Gekata [30.6K]

Answer:

Virtual servers

Explanation:

4 0
3 years ago
2. Answer any
lozanna [386]

Answer:

C

Explanation:

martin luther kings speech is being restated in todays current events in the BLM protests because martin luther king was basically fighting for black peoples rights and the 14th and 15th amendments were supposed to help black peoples rights and freedom but today people aret following that because of police violence/brutality

8 0
3 years ago
You share a number of files from your computer, and you've received a number of calls from users who say they can't connect to t
zmey [24]

Answer:

ifconfig p2s1 down ifdown enp2s1 ip link set enp2s1 down

Explanation:

It can be used to enable or disable a network port interface in Linux. It involves 5 methods which are.

A.) ifconfig command. Is adopted in configuring a network interface, it gives info about NIC

B.) ifdown/if up command. Used to bring down or bring up a network interface.

C.) ip command. Used in managing NIC

D.) nmc1i command

It is a line tool that controls network manager and is also used in describing the status of a network.

E.) nmtui command

4 0
3 years ago
Other questions:
  • Write a function named times_ten. the function should accept an argument and display the product of its argument multiplied time
    13·1 answer
  • What is the purpose of exporting your public key to the directory services server?
    11·1 answer
  • Egyptian hieroglyphs were part of a writing system used by the ancient Egyptians. What type of graphic design elements did they
    13·1 answer
  • ____ is the security guarantee that people who intercept messages cannot read them. A. Availability B. Encryption C. Confidentia
    9·1 answer
  • What disese is sue suffering from
    15·2 answers
  • Nuclear batteries use devices called thermocouples, which convert the ____ of a nuclear reaction into electricity.
    9·1 answer
  • In Java:
    15·1 answer
  • Why is science, mathematics, and technology different from engineering?
    15·1 answer
  • _________ can be used to provide access control, confidentiality, data origin authentication, connectionless integrity, rejectio
    12·1 answer
  • 0111101101010110101110110001001011101001011101101010101010110101
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!