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 one example of the decomposers taking from the ecosystem and one of them giving to the ecosystem
adelina 88 [10]
Like when a seed drops on the ground, and a bee come to take some honey. It sticks to the bee and where the bee goes, the bee will rub it off and the seed will start to grow.
8 0
2 years ago
Amy uses digital devices to listen to music and to watch movies. Which one of these is Mbps a measure of?
posledela

Answer:

Storage Size

Explanation:

the answer to which is better 8 Mbps or 2 MBps? Is 2 MBps (which is 16 Mbps). Using a less common, but more clear notation: which is better 8 Mbit/s or 2 MBps? Answer: 2 MBps, since that is 16 Mbit/s. (Marketing people use this confusion to their advantage if you're not sure which is intended, ask.)

Source http://cs.sru.edu/~mullins/cpsc100book/module02_introduction/module02-05_introduction.html

(if you want to read the full artical.)

8 0
2 years ago
The function keys are labeled from f1 to wat
Fed [463]
If we are talking about a simple North American Keyboard, The answer would be F1 to F12
Hope this Helps!!!
8 0
3 years ago
Why are using some special characters (@, #, !, etc.) not a good idea?
konstantin123 [22]
There are pros and cons to using special characters in email subject lines. Generally, marketers report higher open rates.

Some report better engagement, but many don’t.

There are also reports of special characters causing problems with deliverability, mostly because spammers became very fond of special characters for a while.
5 0
3 years ago
Read 2 more answers
HELP ASAP DUE IN 10 MINUTES!!! HELP!!!!!<br> Problem solver<br> Logical<br> Innovative
marshall27 [118]
The first one is problem solver, the second one is Innovative, and the third one is logical.
6 0
3 years ago
Read 2 more answers
Other questions:
  • Will upvote all answers
    7·1 answer
  • Consider the classes below, declared in the same file: class A { int a; public A() { ​ a = 7; } } class B extends A { int b; pub
    6·1 answer
  • Match the elements of a web page with their descriptions?
    15·2 answers
  • Define stubs for the functions called by the below main(). Each stub should print "FIXME: Finish FunctionName()" followed by a n
    7·1 answer
  • Can someone help me asap​
    13·1 answer
  • Which of the following statements about the relationship between hardware and software is true? a) Hardware can be present in in
    9·1 answer
  • !!!!!16 POINTS!!!!Can a computer evaluate an expression to something between true and false? Can you write an expression to deal
    7·1 answer
  • Universal Container wants to understand all of the configuration changes that have been made over the last 6 months. Which tool
    15·1 answer
  • MSWord is a popular___________ program.​
    7·2 answers
  • The ___________ method returns the length of an array.
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!