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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started