On 22 November, 2024 TCS nqt Phase 2 held at Ahmedabad at iON Digital Zone, Bopal. we are given total 6 section, including 4 section of mcq and non-mcq type question and remaining were of coding.
In the first coding question, we are ask to take one integer from user and check if the integer is less than 0 then print invalid temp or if less than 15 then print Its cold else print its not cold. Its just a simple if else coding question asked. I have solve it there with in 3-5 min only and the program got compiler in first try. But the testcase got failed so I try to change the code for the same but still the test case failing there. I tried it at my own PC after the exam. it successfully compiled and executed.
Even though the output by the code written by me and the expected output is same as shown in the compiler window, still compiler fails to pass the testcase, not a single test case pass. And the second coding question easily got compiled and executed.
I`m attaching the code I tried at my PC to show the output. Its the same code I have written in exam.
I Hope TCS will find a way to help me.
Was this information helpful? |
Post your Comment