Subscribe to our YouTube Channel : Swayam Solver
Please scroll down for latest Programs. 👇
W1_Programming_Qs.1
Due on 2023-08-10, 23:59 IST
Consider the following program. Fill in the blanks as per the instructions given below:
• at LINE-1 with stack declaration,
• at LINE-2 to push values into stack,
• at LINE-3 with appropriate statement
such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | computer | eumc | eumc | Passed |
Test Case 2 | programming | gimrop | gimrop | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
W1_Programming_Qs.2
Due on 2023-08-10, 23:59 IST
Consider the following program. Fill in the blanks as per the instructions given below.
• at LINE-1 with appropriate header statement,
• at LINE-2 with appropriate statement to calculate Euclidean distance
such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 4 3 6 9 | 6 | 6 | Passed |
Test Case 2 | 2 5 3 9 | 4 | 4 | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
W1_Programming_Qs.3
Due on 2023-08-10, 23:59 IST
Consider the following program. Fill in the blanks as per the instructions given below:
• at LINE-1 with appropriate function header,
• at LINE-2 with appropriate return statement
such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | hello hi bye | hi hello bye | hi hello bye | Passed after ignoring Presentation Error |
Test Case 2 | soumen arup himadri | soumen himadri arup | soumen himadri arup | Passed after ignoring Presentation Error |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
W2_Programming_Qs.1
Due on 2023-08-10, 23:59 IST
Consider the following program. Fill in the blanks as per the instructions given below:
• at LINE-1 with function header
such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 2 3 | 5 | 5 | Passed |
Test Case 2 | 8 -2 | 8 | 8 | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
W2_Programming_Qs.2
Due on 2023-08-10, 23:59 IST
Consider the following program. Fill in the blanks as per the instructions given below.
• at LINE-1 with appropriate function parameter,
• at LINE-2 with appropriate statement
such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 4 | 16 16 | 16 16 | Passed |
Test Case 2 | 2 | 4 4 | 4 4 | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
W2_Programming_Qs.3
Due on 2023-08-10, 23:59 IST
Consider the following program. Fill in the blanks as per the instructions given below:
• at LINE-1 with appropriate function header,
• at LINE-2 with appropriate return statement
such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 1 2 3 4 | (4, 6)(4, 6) | (4, 6)(4, 6) | Passed |
Test Case 2 | 2 4 6 8 | (8, 12)(8, 12) | (8, 12)(8, 12) | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
W3_Programming_Qs.1
Due on 2023-08-17, 23:59 IST
Consider the following program. Fill in the blanks as per the instructions given below:
• Complete two constructor statements at LINE-1 and LINE-2,
• Complete the return statement at LINE-3 to calculate the manhattan distance between two points,
such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 1 2 3 4 | (1,2)\n
(3,4)\n
Distance: 4 | (1,2)\n
(3,4)\n
Distance: 4 | Passed |
Test Case 2 | 1 -1 2 -2 | (1,-1)\n
(2,-2)\n
Distance: 2 | (1,-1)\n
(2,-2)\n
Distance: 2 | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
W3_Programming_Qs.2
Due on 2023-08-17, 23:59 IST
Consider the following program. Fill in the blanks as per the instructions given below.
• at LINE-1 with constructor definition,
• at LINE-2 with appropriate statement to deallocate array memory
such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 4
1 3 5 8 | Min: 1 | Min: 1 | Passed |
Test Case 2 | 3
7 3 9 | Min: 3 | Min: 3 | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
W3_Programming_Qs.3
Due on 2023-08-17, 23:59 IST
Consider the following program. Fill in the blanks at LINE-1, LINE-2 and LINE-3 with
Consider the following program. Fill in the blanks at LINE-1, LINE-2 and LINE-3 with
appropriate keywords such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 1 Raj 36 5 | 1 : Raj : 41 | 1 : Raj : 41 | Passed |
Test Case 2 | 2 Amal 48 20 | 2 : Amal : 68 | 2 : Amal : 68 | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
W4_Programming_Qs.1
Due on 2023-08-24, 23:59 IST
Consider the following program. Fill in the blanks as per the instructions given below:
• Complete the variable declaration at LINE-1,
• Complete the function prototype at LINE-2 and LINE-3 with appropriate keywords
such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 1 Raj 10000 1000 | 1 : Raj : 11000 | 1 : Raj : 11000 | Passed |
Test Case 2 | 2 Zakir 50000 5000 | 2 : Zakir : 55000 | 2 : Zakir : 55000 | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
W4_Programming_Qs.2
Due on 2023-08-24, 23:59 IST
Consider the following program. Fill in the blanks as per the instructions given below.
• at LINE-1 with appropriate forward declaration,
• at LINE-2 with appropriate statement
such that it will satisfy the given test cases
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 3 4 | 12 -1 | 12 -1 | Passed |
Test Case 2 | 2 7 | 14 -5 | 14 -5 | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
W4_Programming_Qs.3
Due on 2023-08-24, 23:59 IST
Consider the following program. Fill in the blanks at LINE-1, LINE-2 and LINE-3 with appropriate statements such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 1 2 | 11 | 11 | Passed |
Test Case 2 | 2 3 | 22 | 22 | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
W5_Programming_Qs.1
Due on 2023-08-31, 23:59 IST
Consider the following program. Fill in the blanks as per the instructions given below:
• Complete the inheritance statement at LINE-1,
• Complete the return statement at LINE-2 and LINE-3 to calculate the volume and surface
area of a cube,
such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 4 | 64, 96 | 64, 96 | Passed |
Test Case 2 | 3 | 27, 54 | 27, 54 | Passed |
W5_Programming_Qs.2
Due on 2023-08-31, 23:59 IST
Consider the following program. Fill in the blanks as per the instructions given below.
• at LINE-1 with appropriate keyword,
• at LINE-2 and LINE-3 with appropriate constructor statements
such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | Bus 4 | Bus: Four Wheeler | Bus: Four Wheeler | Passed |
Test Case 2 | Bike 2 | Bike: Two Wheeler | Bike: Two Wheeler | Passed |
W5_Programming_Qs.3
Due on 2023-08-31, 23:59 IST
Consider the following program. Fill in the blanks as per the instructions given below.
• at LINE-1 with appropriate inheritance statement,
• at LINE-2 with appropriate constructor statement
such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 1 | 1, 6, 11 | 1, 6, 11 | Passed |
Test Case 2 | 5 | 5, 10, 15 | 5, 10, 15 | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
W6_Programming_Qs.1
Due on 2023-09-07, 23:59 IST
Consider the following program. Fill in the blanks as per the instructions given below:
• Complete the destructor statement,
• Complete the constructor statement,
such that it will satisfy the given test cases
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 4 | 4 12 4 2 | 4 12 4 2 | Passed |
Test Case 2 | 2 | 2 6 4 2 | 2 6 4 2 | Passed |
W6_Programming_Qs.2
Due on 2023-09-07, 23:59 IST
Consider the following program. Fill in the blanks as per the instructions given below.
• at LINE-1, define fun as pure abstract function,
• at LINE-2, complete constructor definition,
• at LINE-3, complete constructor definition,
such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 2 | 4 6 | 4 6 | Passed |
Test Case 2 | 3 | 6 9 | 6 9 | Passed |
W6_Programming_Qs.3
Due on 2023-09-07, 23:59 IST
Consider the following program. Fill in the blanks as per the instructions given below.
• at LINE-1, declare the function show() as pure virtual function,
• at LINE-2, with appropriate function call,
• at LINE-3, with appropriate function header,
such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 10 15 | 25 75 | 25 75 | Passed |
Test Case 2 | 5 10 | 15 25 | 15 25 | Passed |
----------------------------------------------------------------------------------------------------------------------------
W7_Programming_Qs.1
Due on 2023-09-14, 23:59 IST
Consider the following program. Fill in the blanks as per the instructions given below:
• at LINE-1, complete the constructor statement,
• at LINE-2 and LINE-3, complete the operator overloading function header,
such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | C | c: position is 3 | c: position is 3 | Passed |
Test Case 2 | G | g: position is 7 | g: position is 7 | Passed |
W7_Programming_Qs.2
Due on 2023-09-14, 23:59 IST
Consider the following program. Fill in the blanks as per the instructions given below.
• at LINE-1, complete the constructor definition,
• at LINE-2, complete the overload function header,
such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | fun | Coding is fun | Coding is fun | Passed |
Test Case 2 | easy | Coding is easy | Coding is easy | Passed |
W7_Programming_Qs.3
Due on 2023-09-14, 23:59 IST
Consider the following program. Fill in the blanks as per the instructions given below:
• at LINE-1, complete the overload function header,
• at LINE-2, complete the casting operator statement,
• at LINE-3, complete the casting operator statement,
such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 5 | 10 15 | 10 15 | Passed |
Test Case 2 | 3 | 10 13 | 10 13 | Passed |
W8_Programming_Qs.1
Due on 2023-09-21, 23:59 IST
Consider the following program. Fill in the blanks as per the instructions given below:
• Fill in the blank at LINE-1 and LINE-2 with appropriate statements for class template specialization.
• Fill in the blank at LINE-3 with appropriate initializer list.
The program must satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 3 | 97.45, programm | 97.45, programm | Passed |
Test Case 2 | 5 | 95.45, progra | 95.45, progra | Passed |
W8_Programming_Qs.2
Due on 2023-09-21, 23:59 IST
Consider the following program. Fill in the blanks as per the instructions given below.
• Fill in the blank at LINE-1 with appropriate template declaration for class DataSet.
• Fill in the blank at LINE-2 with appropriate declaration of array arr.
• Fill in the blank at LINE-3 with appropriate parameter / parameters for function operator=.
such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | a b c
1 2 3 | c b a 3 2 1 | c b a 3 2 1 | Passed after ignoring Presentation Error |
Test Case 2 | x y z
10 20 30 | z y x 30 20 10 | z y x 30 20 10 | Passed after ignoring Presentation Error |
W8_Programming_Qs.3
Due on 2023-09-21, 23:59 IST
Consider the following program. Fill in the blanks as per the instructions given below:
• Fill in the blank at LINE-1 with appropriate constructor for structure Stat.
• Fill in the blank at LINE-2 with appropriate header declaration for functor.
• Fill in the blank at LINE-3 with appropriate return statement.
The program must satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 4 10 20 30 40 | 100 25 | 100 25 | Passed |
Test Case 2 | 6 1 2 3 4 5 6 | 21 3.5 | 21 3.5 | Passed |
W9_Programming_Qs.1
Due on 2023-09-28, 23:59 IST
Consider the following program that finds the minimum element in an array. Fill in the blanks
as per the instructions given below:
• Fill in the blank at LINE-1 with appropriate template declaration.
• Fill in the blanks at LINE-2 and LINE-3 with appropriate conditional statement.
The program must satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 5
50 27 10 70 23 | 10 | 10 | Passed |
Test Case 2 | 6
94 5 22 45 32 1 | 1 | 1 | Passed |
W9_Programming_Qs.2
Due on 2023-09-28, 23:59 IST
Consider the following program that takes inputs a lower limit (l) and an upper limit (u) of
a vector. If all the elements of the input vector are within the given lower and upper limits,
the program prints "all in [l, u]". Otherwise, the program prints the first element of the vector
which is not within the given limits. Fill in the blanks as per the instructions given below:
• at LINE-1 with appropriate header to overload function operator,
• at LINE-2 with appropriate template definition,
• at LINE-3 with appropriate condition,
such that the program will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 10 100 | all in [10, 100] | all in [10, 100] | Passed |
Test Case 2 | 10 70 | 90 is the first element not in [10, 70] | 90 is the first element not in [10, 70] | Passed |
W9_Programming_Qs.3
Due on 2023-09-28, 23:59 IST
Consider the following program, which computes the frequency of occurrence (histogram) of
each integer in a given vector. Fill in the blanks as per the instructions given below:
• at LINE-1 with appropriate statement to iterate over the given vector v,
• at LINE-2 with appropriate statement to iterate over the given map hi,
such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 9 4 5 3 4 6 7 4 3 5 | 3: 2, 4: 3, 5: 2, 6: 1, 7: 1, 9: 1, | 3: 2, 4: 3, 5: 2, 6: 1, 7: 1, 9: 1, | Passed after ignoring Presentation Error |
Test Case 2 | 6 6 7 3 4 5 6 5 4 7 | 3: 1, 4: 2, 5: 2, 6: 3, 7: 2, | 3: 1, 4: 2, 5: 2, 6: 3, 7: 2, | Passed after ignoring Presentation Error |
W10_Programming_Qs.1
Due on 2023-10-05, 23:59 IST
Consider the following program in C++11/14 to convert between feet and inch. Fill in the
blanks as per the instructions given below:
• at LINE-1 with appropriate header to function convert,
• at LINE-2 with appropriate return statement convert,
such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 12 12 | 144 1 | 144 1 | Passed after ignoring Presentation Error |
Test Case 2 | 90 90 | 1080 7.5 | 1080 7.5 | Passed after ignoring Presentation Error |
W10_Programming_Qs.2
Due on 2023-10-05, 23:59 IST
Consider the following program in C++11/14. Fill in the blanks as per the instructions given
below:
• at LINE-1 with appropriate header and initialization list for the copy constructor,
• at LINE-2 with appropriate header for copy assignment operator overload,
• at LINE-3 with appropriate header and initialization list for the move constructor,
• at LINE-4 with appropriate header for move assignment operator overload,
such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 5 | 5 : 50 : 50 : moved : 5 : moved : | 5 : 50 : 50 : moved : 5 : moved : | Passed after ignoring Presentation Error |
Test Case 2 | -10 | -10 : -100 : -100 : moved : -10 : moved : | -10 : -100 : -100 : moved : -10 : moved : | Passed after ignoring Presentation Error |
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 |
Week 3
ReplyDeleteThank you so much..
ReplyDelete