Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Code a function requiredStrLength() which accepts two strings and return the amount of memory in bytes that must exists if the two strings are to
Code a function requiredStrLength() which accepts two strings and return the amount of memory in bytes that must exists if the two strings are to be concatenated. For example, if s1=This is and s2= a beautiful day! are to be concatenated to =This is a beautiful day! then the function should return 25. This is because s1 has 7 characters, s2 has 17 characters and we have to account for the \0 character representing the end of string.
Prototype
int requiredStrLength(char *s1, char *s2);
Using
String functions strlen() in your code
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