W11_Programming_Qs.1
Due on 2023-10-12, 23:59 IST
Consider the following program (in C++11).
• Fill in the blanks at LINE-1 and LINE-3 with appropriate template definitions.
• Fill in the blanks at LINE-2 and LINE-4 to complete the return statements for product
functions.
The program must satisfy the sample input and output.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 2 3 4
2.3 3.4 4.6 | 24 35.972 863.328 | 24 35.972 863.328 | Passed |
Test Case 2 | 10 20 30
1.5 2.3 -4.5 | 6000 -15.525 -93150 | 6000 -15.525 -93150 | Passed |
W11_Programming_Qs.2
Due on 2023-10-12, 23:59 IST
Consider the program below (in C++11).
• Fill in the blank at LINE-1 with appropriate template declaration.
• Fill in the blanks at LINE-2 with an appropriate universal reference type parameter for
constructor of class derived and an the appropriate call forwarding to the base class
constructor.
The program must satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 10 | lvalue : 10, rvalue : 10, 100 200 | lvalue : 10, rvalue : 10, 100 200 | Passed after ignoring Presentation Error |
Test Case 2 | 50 | lvalue : 50, rvalue : 50, 500 1000 | lvalue : 50, rvalue : 50, 500 1000 | Passed after ignoring Presentation Error |
W11_Programming_Qs.3
Due on 2023-10-12, 23:59 IST
Consider the following program that implements a recursive lambda function to find the sum
of the digits of an input integer.
• Fill in the blank at LINE-1 to declare the signature of revPrint as std::function.
• Fill the blank at LINE-2 to complete the definition of lambda function revPrint.
The program must satisfy the sample input and output.
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
No comments