BETA
School Problem's Submission isn't counted in score!

Total Submissions: 1769 Accuracy:

31.09%

C++ Strings
       

Given two strings as input. Your task is to find the longer string of the two strings, display the length of the longer string and concatenate the two strings and display the concatenated string.

Input: 
First line of the input file contains an integer T which denotes the number of test cases. Then T test cases follow. First line of each test case contains a string A and second line contains another string B.

 

Output:
Corresponding to each test case, In the first line print the length of the longer string and In the second line print the string obtained by concatenating the two strings.

.
Constraints:
1<=T<=10
1<=length(A)<=100
1<=length(B)<=100

Example:
Input:
1
Geeks
forGeeks

Output:
8
GeeksforGeeks

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Harsh Agarwal

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.