Question

Without using the built-in string functions, write a C program to take a choice from the user (use a SWITCH statement) (i) to find the string length (ii) for string concatenation, (iii) string copy and (iv) string comparison.

29 May 2025
Answer :
Word Count : 449
```c #include // Function to find the length of a string int stringLength(char str[]) { int length = 0; while (str[length] != '\0') { length++; } return length; } // Function to concatenate two strings void stringConcatenate(char str1[], char str2[]) { int i = 0, j = 0; // Find the end of the first string while (str1[i] != '\0') { i++; } // Copy second string to the end of first string while (str2[j] != '\0') { str1[i] = str2[j]; i++; j++; } // Null terminate the result string str1[i] = '\0'; printf("Concatenated String: %s\n", str1); } // Function to copy one string into another void
_____ ____ ________ ______ _________ _________ ___ _________ ______ ____ ________.
________ __________ _________ ______ ______ _______ _______ ________ __________ ________.
_______ ____ __________ _________ _________ ______ ___ __________ _________ ______ __________.
_____ ____ ___ _____ __________.
__________ _________ ____ __________ ______ __________ ______.
______ ___ _________ _______ ________ _____ ______ _______ ____ _____ ___ ___.
__________ __________ ___ ___ ______ _____ _________ ____ _______ ______ _____.
___ _________ ____ ______ _____ __________ _____ ________ _______ ____ ______.
____ _______ ____ ______ _________ __________.
_______ ___ _________ _____ _____ _______ ___.
______ _______ ____ _______ ____ ____ ______ _______ ____ __________.
__________ ________ _______ ________ _________.
________ _______ _____ __________ __________ _____ _________ __________ _________.
____ _____ __________ __________ ________.
__________ _______ ___ _________ _________ ____ ________ __________ _____.
_____ _____ _______ _________ _____ _________ ________ _______ _______ _____ ___.
______ ___ __________ ____ _______ __________ ________.
___ ______ _________ ______ ____ ___ _______ _________ _______ ____.
________ ___ ____ ___ ____ _________ ___ ______ _______ ______.
________ _____ ________ _____ _______.
____ ___ _____ ____ _________.
____ ________ ____ ______ ____ _______.
______ ________ ___ _________ ____ ______ __________.
_____ ______ __________ ___ ______ _____.
__________ ____ _____ __________ ________ _______ ______ _______ ______.
_______ ____ _______ _________ _____ _________ _______.
_____ __________ _______ ________ _______ ________.
_______ ________ _________ _____ ______.
___ __________ ____ ____ _______ ________.
________ ____ ______ ________ ______ ____ ___ __________ _______ ______ _____ ____.
___ ________ _______ ________ ___ _____ _____ ______ _______ _______.
_______ ______ ____ _____ _________ _______ ________ ________ ______ _____ _____ _______.
___ _____ _____ ___ ________ _____ ______ ________ _______ ______.
__________ __________ __________ ______ _______ _________ ___ ________.
________ _______ ___ _________ __________ _____ _________ ____ _________ _____ _____.
__________ ____ __________ ___ __________ _______.
___ __________ _________ _______ _________ _____ _____ ______ ______ _____ ______.
_____ _____ _________ ____ ____ _____.
__________ ______ ____ _________ _____ _______ __________ ____.
_______ ____ __________ _________ ____ ______ ___ _______.
___ ______ ___ __________ ____.
_________ __________ _______ __________ ___.
IGNOU ACADEMY
Your IGNOU journey, made easier.
  • Solved Assignments
  • Study Notes
  • Guess Papers
  • Question Papers
Skip in 10
Top
📞
Call Support Instant phone assistance IGNOU MCS 11 2024 2025 - Without using the built-in string functions, write a C program to take | IGNOU Academy
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→