1 write a function called strcat373 which concatenates two strings in precisely the 5346966

1.     Write a function called strcat373,which concatenates two strings in precisely the same waythat strcat does from the Clibrary . The concatened string is constructedin the arraystring1; a pointer to the beginning of this array isalso returned. string2 should not be affected by thisfunction. Please use “array syntax” in strcat373; that is, theparameters as well as the local variables should not use theexplicit pointer declaration (using the * symbol), with theexception of the value that is returned by this function. Instead,you should used the [ ] operator. You maynot use any of the built-in C string libraryfunctions to complete this code.

Here is theprototype of this function:

char *strcat373(char string1[ ], char string2[ ]);

2.     Write a function called strcmp373,which compares two strings in precisely the same waythat strcmp does in the C library .This time, please use “pointer syntax” in writing this function.That is, the [ ] operator should not be used at all when referringto particular characters in string1 and string2; instead, allparameters and local variables should be declared as pointers(using the * symbol).You may not use any of the built-in Cstring library functions to complete this code.

Here is theprototype of this function:

intstrcmp373(char *string1, char *string2);

3.     Write a program which prints thegreatest common divisor (gcd) of 2 integers, which are input fromthe user. Your program should includea recursive function called gcd373,which computes the greatest common divisor of the two inputs. Theprototype for gcd373 should look like this:

int gcd373(int, int);

The recursionshould be based on the following:

gcd373(m,n) = n if m%n == 0

            = gcd373(n,m%n) otherwise

Include as partof your .c file a main function which prompts the user for twointegers, each greater than 1, and computes the greatest commondivisor of these integers using gcd373.

4.     Write 4 C functions, as specified in thetable below, which emulate the C operators |, ^, ~, and !=.You may use only straightline code (i.e., noloops or conditionals) and a limited number of C operators (I'vespecified which operators for each different function below). Yourprogram can also use constants. You should try to write eachfunction so as to perform as few operations as possible.

Here are thefunctions you are required to write:

Function

Operator that this functionemulates

Operators you may use

intbitOr(int, int)

|

= ~&

intbitXOr(int, int)

^

= ~ &|

intbitNot(int)

~

= & ^|

intisNotEqual(int, int)

!=

= ~ &^ |

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now