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
Declaring a variable in the method’s body with the same name as a parameter variable in the method header is ___________.
icang [17]

Answer:

a. a syntax error

Explanation:

When the same variable name is repeated in the parameter set and the method body, it will result in a syntax error. This is because the variable in the parameter has a local scope within the method body. Now if we declare another variable with the same name in the method body, it will result in redefinition of the variable and violate the uniqueness principle of variable names in the method code. This will give rise to syntax error.

8 0
3 years ago
How does form get its power natural gas
lana [24]

Answer:

because it does

Explanation:

7 0
2 years ago
Early photographers take to work with what in order to produce photographs? (Btw this is photography, it just isn't a subject in
Kruka [31]
1, they used to use chemicals.
4 0
3 years ago
If you enter the search "genetically modified foods" in a database, the double quotes around the three words will:
In-s [12.5K]

Answer:

Have a more specified search

Explanation:

If you do this in G0OGLE Then it will be the same thing all it basically does it narrow down the search to find more of what you want

4 0
2 years ago
Express the following Boolean function using only the NOT and the AND operation
romanna [79]
Here, you go drawn , in paint. Please note that you can simplify further more the circuit by removing any two not following each other. 

3 0
3 years ago
Other questions:
  • 18. Using the same formatting elements and designs across slides in a presentation is important to develop?
    5·1 answer
  • Which of the following best define grit
    13·1 answer
  • Drive-by hacking is a computer attack where an attacker accesses a wireless computer network, intercepts data, uses network serv
    5·1 answer
  • Hey does anybody know how to delete history on a school-issued chrome book, I tried to delete it but it won't let you clear your
    7·1 answer
  • In learning information security, it is important to understand that threats to your company's information assets are present 24
    13·1 answer
  • Which property is assigned to a file by the operating system?
    13·1 answer
  • Functionality testing is primarily used with ____________. firewall protection software development hardening servers server tes
    8·1 answer
  • Borrowing money affects both assests and owners equity. True or false?​
    13·1 answer
  • A rectangle indicates a single process.true or false​
    7·2 answers
  • What is the simplest form of backing up data?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!