Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions

Question

What advice would you provide to Jennifer?

Answered: 1 week ago

Question

What are the issues of concern for each of the affected parties?

Answered: 1 week ago