1.

Structures are very useful when we want to create Linked Lists and Trees. Here we will learn to create a Linked List struct.

Input Format:
The first line of testcase contains T denoting the number of testcases. T testcases follow. Each testcase contains two lines of input. The first line contains N denoting the number of nodes of the linked list. The second line contains the elements of the linked list.

Output Format:
For each testcase, in a new line, print the length of the linked list.

Your Task:
Since this is a function problem, you don't need to take any input. Just complete the provided struct. All the other functions of the linked-list are already implemented.

Constraints:
1 <= T <= 100
1 <= N <= 100

Examples:
Input:

1
5
1 2 3 4 5
Output:
5

Explanation:
Testcase1:

1->2->3->4->5->NULL is the linked list formed. The length is 5

2.

This is a functional problem i.e. partial code is already done for you, invest time to study the locked code and complete the solution accordingly.

In this problem, you need to add 2 given complex numbers and print the resulting complex number using '+' operator.

Implement a class named complex containing data members as real and imaginary part of the complex number and the following function:

  • void display()
  • constructor to assign values to the complex number.
  • operator function to add 2 numbers

Input:

First line of the input contains the number of test cases and each test case contains 4 space separated integer values representing the real and imaginary part of 2 complex numbers ( Real1 imaginary 1   real2 imaginary2 )
Output:

The output to each test case should be a single line representing the resulting complex number from the addition of given complex numbers. In the given format

real + imaginary_i

for eg:  2 +3i
Constraints:

1 <= Test case <= 100
Example:

Input:

2

3 6 -1 4

2 2 -1 -1

Output:

2 + 10i
1 + 1i

3.

Create class named Cuboid with fields length,width and height. Calculate volume of the cuboid.
Class Cuboid contains following functions:
1. set_height(int l): sets the length of the cuboid.
2. set_width(int w): sets width of the cuboid.
3. set_height(int h): sets height of the cuboid.
4.volume(): Prints the volume of the cuboid.

Input:
The first line contains an integer T, the number of test cases. For each test case, three integers are given.

Output:
For each test case, the output is the volume of the cuboid.

User Task:
Since this is a functional problem you don't have to worry about input, you just have to complete the functions given set_height(), set_width(), set_height() and volume().

Constraints:
1 <= T <= 100
1 <= l, w, h <= 103

Example:
Input

2
10 5 7
11 9 4

Output:
350
396