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
U2- an example of __________ is an attempt by an unauthorized user to gain access to a system by posing as an authorized user.
Ivan
The answer is "masquerade".
4 0
3 years ago
Which act requires enterprises to guard protected health information and implement policies and procedures to safeguard it?
bogdanovich [222]

Answer:

D. HIPAA (Health Insurance Portability and Accountability Act)

Explanation:

HIPAA which stands for Health Insurance Portability and Accountability Act, is an act designed by the US government in 1996 to guard patients' confidential health information and also implement policies and procedures to safeguard it. The act contains the required information and instruction for handling patients' medical health information. The law however gives patients (or their representatives) the right to access these information which as a matter of fact must be made available within 30 days from the day of request.

PS: Not sure why the option D in the question contains ' FTF '. I have taken it to be a typo because without it, the option is in itself complete.

7 0
3 years ago
As a student, why do you need to know and follow the steps printing a <br><br>document?​
Kazeer [188]
So I am able to print my math notes and keep up in geometry.
7 0
3 years ago
Read 2 more answers
Windows organises information on computer using a
lana66690 [7]
B folder
hope i helped
8 0
3 years ago
Read 2 more answers
Please help to question 16 and 17 please
Y_Kistochka [10]
17.incorrect code........................sorry I'm not sure about number 16
5 0
4 years ago
Other questions:
  • Which is an advantage of programming with a procedural language?
    12·2 answers
  • What short (two letters!) but powerful boolean operator can check whether or not one string can be found in another string?
    12·1 answer
  • Information from the system that is used to make modifications in the input, processing actions, or outputs is referred to as: G
    9·2 answers
  • Jerry has received an email on his company’s email system. The email is in regard to a new update the company plans to implement
    9·1 answer
  • When you use information hiding by selecting which properties and methods of a class to make public, you are assured that your d
    14·1 answer
  • Blender is used by which video game team member?
    15·1 answer
  • How Can I add a image in an HTML program?​ please tell
    6·1 answer
  • What is software and explain the five types of software
    5·2 answers
  • Why might a company choose Linux for its operating system instead of Microsoft Windows or Mac OS? The company's employees can sy
    13·1 answer
  • Some of y'all make me lose braincells with your questions
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!