Filter interviews by
I applied via campus placement at National Institute of Technology (NIT), Tiruchirappalli and was interviewed in Mar 2024. There were 2 interview rounds.
3 hard coding questions followed by aptitude
To check if a number is prime, divide it by all numbers up to its square root and check for any divisors.
Start by checking if the number is less than 2, as prime numbers start from 2.
Then iterate from 2 to the square root of the number and check for any divisors.
If no divisors are found, the number is prime.
The logical error in the given C++ code is that the catch block is catching a generic exception type instead of a specific one.
Catch block should catch specific exception types to handle them appropriately.
Example: Instead of catching 'exception' in the catch block, catch 'std::runtime_error' or 'std::logic_error'.
Top trending discussions
Software Development Engineer
4
salaries
| ₹10.5 L/yr - ₹23 L/yr |
Sdet Engineer
4
salaries
| ₹7 L/yr - ₹11 L/yr |
Software Engineer
3
salaries
| ₹10 L/yr - ₹58 L/yr |
Product Manager
3
salaries
| ₹23 L/yr - ₹96 L/yr |
Sdet
3
salaries
| ₹10 L/yr - ₹13.4 L/yr |
Grey Orange
Drishti Technologies
Sastra Robotics
Systemantics