TCS
10+ Hiresters Interview Questions and Answers
Q1. What is namespace in Python? What are tuples Difference between mutable and immutable What is slicing How do you reverse a string using slicing? What is Exceptional handling? What are different blocks of except...
read moreNamespace in Python is a way to organize and manage variables, functions, and classes. Tuples are immutable sequences of elements. Slicing is a way to extract a subset of elements from a sequence.
Namespace in Python helps avoid naming conflicts by organizing variables, functions, and classes.
Tuples are immutable and ordered collections of elements, defined using parentheses. Example: my_tuple = (1, 2, 3)
Mutable objects can be changed after creation, while immutable objects ca...read more
Q2. Difference between call by value and reference by value?
Call by value passes a copy of the value while reference by value passes a copy of the reference to the value.
Call by value passes the value of a variable to a function, while reference by value passes the reference to the variable.
In call by value, any changes made to the parameter inside the function do not affect the original variable outside the function.
In reference by value, any changes made to the parameter inside the function affect the original variable outside the f...read more
Q3. Reversing six digit Number using C
Reversing a six-digit number using C programming language.
Take input of a six-digit number from the user.
Extract each digit of the number using modulus operator.
Multiply the extracted digit with its respective place value and add it to the reversed number.
Repeat the above step for all digits.
Print the reversed number.
Q4. What are different blocks of exception handling Difference between final and finally Can static methods be overridden? Give examples for it?
Exception handling blocks include try, catch, finally. final is a keyword for declaring constants, finally is a block always executed. Static methods cannot be overridden.
Exception handling blocks: try, catch, finally
final keyword for constants, finally block always executed
Static methods cannot be overridden
Q5. What is Array?
An array is a collection of similar data types stored in contiguous memory locations.
Arrays can be of any data type such as integers, floats, characters, etc.
Arrays are accessed using an index starting from 0.
Arrays can be one-dimensional, two-dimensional, or multi-dimensional.
Example: string[] names = {"John", "Jane", "Bob"};
Example: int[] numbers = new int[5];
Q6. Tell me about bps? What is tcs.
BPS stands for Business Process Services. TCS is a multinational IT services company.
BPS involves outsourcing of non-core business functions to a third-party provider.
TCS offers a range of IT services including consulting, application development, and maintenance.
TCS is headquartered in Mumbai, India and operates in over 46 countries.
TCS is one of the largest IT services companies in the world with a market capitalization of over $100 billion.
Q7. Which programming language are you comfortable in
I am comfortable in Java and Python for programming.
Proficient in Java for object-oriented programming
Skilled in Python for data analysis and scripting
Q8. What is pointer? What is arrar, diff bet c & C++
A pointer is a variable that stores the memory address of another variable. An array is a collection of similar data types stored in contiguous memory locations. C is a procedural programming language, while C++ is an object-oriented programming language.
Pointer in C: int *ptr; // declaring a pointer to an integer variable
Array in C++: int arr[5]; // declaring an array of integers with 5 elements
Difference between C & C++: C is procedural, C++ is object-oriented
Q9. Syntax for while loop and for loop?
Syntax for while loop and for loop
For loop: for(initialization; condition; increment/decrement){ //code block }
While loop: while(condition){ //code block }
Example: for(int i=0; i<5; i++){ cout<
Example: int i=0; while(i<5){ cout<
Q10. What is pointer in C?
Pointer is a variable that stores the memory address of another variable in C programming language.
Pointers are used to manipulate data structures like arrays, linked lists, and trees.
They can be used to pass values by reference to functions.
Pointer arithmetic can be performed to access elements of an array.
Example: int *ptr; ptr = # printf("%d", *ptr);
Example: void swap(int *a, int *b) { int temp = *a; *a = *b; *b = temp; }
Example: int arr[5] = {1, 2, 3, 4, 5}; int *ptr = ar...read more
Q11. types of chart in power bi
Types of charts in Power BI include bar charts, line charts, pie charts, scatter plots, and more.
Bar chart
Line chart
Pie chart
Scatter plot
Area chart
Donut chart
Waterfall chart
Treemap
KPIs
Gauge chart
Q12. Program on fibonacci.
Fibonacci program generates a series of numbers where each number is the sum of the two preceding ones.
Declare variables for first and second numbers of the series
Use a loop to generate the series up to a certain limit
Add the previous two numbers to get the next number in the series
Print the series
Q13. Difference between list and tuple
List is mutable, tuple is immutable in Python.
List can be modified after creation, tuple cannot
List is defined using square brackets [], tuple using parentheses ()
List is used for collections of items that may change, tuple for fixed collections
Example: list_example = [1, 2, 3], tuple_example = (4, 5, 6)
Q14. code for known language
Provide a code snippet in a known programming language.
Use proper syntax and conventions of the chosen language.
Include comments to explain the code logic.
Ensure the code is functional and error-free.
Q15. speak any topic for 2mintes
The impact of social media on mental health
Introduction to social media and its prevalence in society
Discuss the potential negative effects on mental health such as anxiety and depression
Explore the role of cyberbullying and comparison culture on mental well-being
Highlight the importance of digital detox and self-care practices
Provide examples of successful campaigns promoting mental health awareness on social media
More about working at TCS
Top HR Questions asked in Hiresters
Interview Process at Hiresters
Reviews
Interviews
Salaries
Users/Month