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 the most important for you to choose before you build a network?
olga nikolaevna [1]
Network media is most important
4 0
4 years ago
What does a wholesaler do?
Svetach [21]
Wholesalers acquire goods from manufacturers, farmers or miners, holds them then distributes them to retailers.
6 0
3 years ago
Differentiate between refraction of light and reflection of light
lapo4ka [179]

Refraction represents a change in the direction of propagation when beams of light encounter a medium with a different density.

Reflection is the return of light to the medium it came from when it encounters a mirror.

3 0
3 years ago
Read 2 more answers
Adding Web pages helps Web designers ___. Choose all answers that are correct.
ss7ja [257]

Answer:

B

Explanation:

7 0
3 years ago
Why should you stay out of the open space to the right of a semi tractor trailer?
dimulka [17.4K]
The right side to a semi tractor trailer is their huge blind side, meaning the driver can't see you, and may merge lanes with you, thus crashing into you.
5 0
3 years ago
Read 2 more answers
Other questions:
  • Which information is considered free for use?
    9·2 answers
  • You wrote a C application that takes 20 seconds using your desktop processor. An improved C compiler is released that requires o
    6·1 answer
  • What is text box and label control​
    10·2 answers
  • HELP PLZ !!
    13·1 answer
  • is there an app i can use to make a picture appear in the corner of a video then disappear after being up for a second?
    6·2 answers
  • What is a collection of computer programs that administer the hardware and software of a computer so that they work properly?
    7·1 answer
  • Which of the following is NOT a useful strategy when making an informed purchase ?
    7·1 answer
  • What are acenders? What are decenders?
    10·2 answers
  • Please someone do this for me and send a screenshot i really need it for my exams pleaseeee :(<br>​
    10·1 answer
  • When designers follow accepted standards and protocols, which of the four basic characteristics of network architecture is achie
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!