When we are using string functions we have to include a header file #include<string.h>
1) strlen():- This function is used to return the length of a string.
1) strlen():- This function is used to return the length of a string.
syntax:- strlen(string);
Write a program to calculate the length of the string with using string function

Write A Program read a string findout the length of the string without using string function.

2) strupr():This function converts the given string into upper case(capitals)
syntax:- strupr(string);
3) strlwr():This function converts the given string into lower case.
syntax:- strlwr(string);
Write A Program read a two strings convert into upper and lower case with using string functions.

Write A Program read a string convert into upper case without using string functions.

Write A Program read a string convert into lower case without using string functions.

4.Strrev(): This function reverses the given string.
Syntax:- strrev(string);
Write A Program read two strings print the reverse of the string with using string functions.

Write A Program read a string print the reverse of the string without using string functions.

(or)

5) strcpy():- This function copies a string from one string variable to another string variable.
syntax:- strcpy(target_string , source_string);
WAP to copy one string to another with using string function.

Write A Program to copy one string to another without using string function.

6) strcmp(): (String comparison) This compares one string with another string, if two strings are equal this function returns 0, else it returns the numeric difference between the non-matching characters.
Syntax:- strcmp(string1, string2);
Write A Program read two strings them both are equal or not with using string function.

WAP read two strings compare them both are equal or not without using string function.

No comments:
Post a Comment