Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I have problems in to understand the reusability concept and how to design for r

ID: 3631826 • Letter: I

Question

I have problems in to understand the reusability concept and how to design for reusability. Can I have some examples of the use of reusability?

Explanation / Answer

i am so here very simple example of useability in C programing . This program will ask user to inter three line and print the largest one using the strlen() function of string.h header file. #include #include int main() { char A[250],B[250],C[250]; printf("Enter a line "); scanf("%s",&A); printf(" Enter a line "); scanf("%s",&B); printf(" Enter a line "); scanf("%s",&C); if(strlen(A)>strlen(B)) if(strlen(A)>strlen(C)) printf("%s",A); else printf("%s",C); else if(strlen(B)>strlen(C)) printf("%s",B); else printf("%s",C); return(0); } Here the printf() and strlen() function is being reused.These function have been written by standard compiler writer but be can use it any program.We need not write code for these function we simply the header file in which it has been define and use it.