TCS
10+ Castlight Health Interview Questions and Answers
Q1. How to check only the file (not folders or links) in Unix directory? Ans. find . - maxdepth 1 -type f . Here maxdepth option will restrict search only in current directory else it will check sub directories as ...
read moreTo check only files (not folders or links) in Unix directory, use 'find . -maxdepth 1 -type f'
Use the 'find' command in Unix
Add the option '-maxdepth 1' to restrict search to current directory
Add the option '-type f' to search only for files
This will exclude folders and links from the search
Q2. One simple coding question to find a number is prime or not.
Check if a number is prime or not using a simple coding question.
Iterate from 2 to square root of the number and check if the number is divisible by any of the numbers in that range.
If the number is divisible by any number other than 1 and itself, then it is not prime.
Examples: 7 is prime (divisible by 1 and 7 only), 10 is not prime (divisible by 1, 2, 5, and 10).
Q3. How to triage null pointer expectations in java
To triage null pointer expectations in Java, check for null values before accessing objects or invoking methods.
Always perform null checks before accessing object properties or invoking methods to avoid NullPointerException.
Use conditional statements like if-else or ternary operators to handle null values appropriately.
Consider using Optional class introduced in Java 8 to handle null values more effectively.
Utilize logging and debugging tools to identify the root cause of nul...read more
Q4. What are oops concepts
Oops concepts refer to Object-Oriented Programming concepts that help in organizing and managing code efficiently.
Inheritance: Allows a class to inherit properties and behavior from another class.
Encapsulation: Bundling data and methods that operate on the data into a single unit.
Polymorphism: Ability of a method to do different things based on the object it is acting upon.
Abstraction: Hiding the complex implementation details and showing only the necessary features to the us...read more
Q5. sort the list and take out 2nd minimum
Sort the list of strings and remove the 2nd minimum element.
Sort the list of strings in ascending order.
Remove the 2nd element from the sorted list.
Q6. Write a program in java
A program in Java to print 'Hello, World!'
Create a class with a main method
Use System.out.println() to print the message
Q7. define append and extend.
Append adds a single element to the end of a list, while extend adds multiple elements to the end of a list.
Append adds a single element to the end of a list.
Extend adds multiple elements to the end of a list.
Example: list1 = [1, 2, 3], list2 = [4, 5], list1.append(4) will result in list1 = [1, 2, 3, 4], list1.extend(list2) will result in list1 = [1, 2, 3, 4, 5]
Q8. What is osi , bgp
OSI (Open Systems Interconnection) is a conceptual framework that standardizes the functions of a telecommunication or computing system into seven abstraction layers. BGP (Border Gateway Protocol) is a standardized exterior gateway protocol designed to exchange routing and reachability information among autonomous systems (AS) on the Internet.
OSI is a conceptual framework that standardizes the functions of a telecommunication or computing system into seven abstraction layers....read more
Q9. Explain testing methodology
Testing methodology is a systematic approach to testing software to ensure quality and reliability.
Testing methodology involves planning, designing, executing, and evaluating tests.
It includes defining test objectives, test cases, and test data.
Different types of testing methodologies include black box testing, white box testing, and regression testing.
Testing methodologies help identify defects and ensure that software meets requirements and functions correctly.
Q10. Sql find 2nd highest salary
Use SQL query with ORDER BY and LIMIT to find the 2nd highest salary.
Use SELECT statement with ORDER BY clause to sort salaries in descending order
Use LIMIT 1,1 to skip the highest salary and retrieve the 2nd highest salary
More about working at TCS
Top HR Questions asked in Castlight Health
Interview Process at Castlight Health
Top Technical Support Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month