0% found this document useful (0 votes)
13 views1 page

String Manipulation Techniques

Uploaded by

koushikshaha3131
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views1 page

String Manipulation Techniques

Uploaded by

koushikshaha3131
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

String

(a) Take a string as input and count its length.


Sample Input1: I hate Programming.
Sample Output: Length of string is 19.

(b) Take a string as input and reverse it.


Sample Input: I Hate Programming.
Sample Output: .gnimmargorP etaH I

(c) Take two strings as input and merge them.


Sample Input1: I hate Programming.
Sample Input2: Let’s Drop the course.
Sample Output: I hate [Link]’s Drop the course.

(d) Take a string as input and find how many times the character ‘a’ appears in it.
Sample Input: I hate Programming.
Sample Output: a appeared 2 times.

(e) Take two strings as input and compare them.


Sample Input1: Hello World.
Sample Input2: Bye World.
Sample Output: Not Same.

You might also like