Hi, I am relatively new to programming enviroment.
I want to ask something regarding file handling. My problem is as follows:
My program is to read from a file named "input.txt." The input consists of T test cases. The number of test cases T is given in the first line of the file. For each test case, two strings and x and y (|x|<50, |y|<50) are given in the first and the second line, respectively. The alphabet is the set of the lowercase English characters.
My program is to write to a file named "output.txt." For each case, print an value s of x and y in the first line and its length in the second line, respectively. Note that there can be more than one value but I should print only one.
The following shows sample input and output for two test cases.
2 ( Since value at line 1 is 2, four data possible)
ababc (1st character string)
bcba ( 2nd character string)
aabbabab (3rd character String)
abababa (4th character String)
bc (/ba/bb) ( Comparing 1st character String and 2nd character String)
abbaba (/ababab) ( Comparing 3rd character string and 4th character string)
can anyone help me solving this problem.