Question: Question 2: Write a C program for the following functions: 1. intstrlen(char *s); [returns string length] 2. char* strcpy(char *s1, char *s2); [Copies string s2

Question 2: Write a C program for the following functions:

1. intstrlen(char *s); [returns string length]

2. char* strcpy(char *s1, char *s2); [Copies string s2 into string s1. The value of s1 is returned.] 3. char* strcat(char *s1, char *s2); [Appends string s2 to string s1. The first character of s2 overwrites the terminating null character of s1. The value of s1 is returned.]

Use above function in your program to get and print length of a string, copy str1 to str2 and append str2 at the end of str1. Do not use string.h header file in your programme.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!