Cognizant
60+ Nitstone Finserv Interview Questions and Answers
Q1. What is stack? How do you convert a queue to stack?
Stack is a data structure that follows LIFO (Last In First Out) principle. Converting a queue to stack requires dequeuing and pushing elements.
Stack is a collection of elements with two main operations: push and pop.
Push adds an element to the top of the stack, while pop removes the top element.
Converting a queue to stack requires dequeuing all elements and pushing them onto a stack.
Example: Queue: 1-2-3-4-5, Stack: 5-4-3-2-1
Q2. What is the difference between structure and class?
Structures are value types while classes are reference types.
Structures are allocated on stack while classes are allocated on heap.
Structures do not support inheritance while classes do.
Structures cannot have explicit parameterless constructors while classes can.
Structures are used for small data structures while classes are used for larger, more complex objects.
Example of structure: struct Point { int x, y; }
Example of class: class Person { string name; int age; }
Q3. Two defined table and fetching data is done one table has 20 records of 20 students another table has 10 student information if i want to pick the common record how to pick?
Use SQL JOIN to fetch common records from two tables.
Use SQL JOIN to combine the two tables based on a common column (e.g. student ID).
Select the columns you want to retrieve from both tables.
Use the WHERE clause to filter out the records that are common between the two tables.
Q4. What is the difference between RDBMS and DBMS? Explain database with a real life example of database.
RDBMS is a type of DBMS that uses a relational model to store and manage data.
DBMS is a general term for any software that manages data
RDBMS uses tables with rows and columns to store data
RDBMS enforces relationships between tables using keys
Example: MySQL, Oracle, SQL Server
Example of a database: a customer database for a retail store
Q5. If i want to select uncommon records which does not match how to pick?
To select uncommon records that do not match, use the NOT IN or NOT EXISTS clause in SQL.
Use the NOT IN clause to select records that do not match a specific list of values.
Use the NOT EXISTS clause to select records that do not have a matching record in a subquery.
Example: SELECT * FROM table_name WHERE column_name NOT IN (value1, value2);
Example: SELECT * FROM table1 WHERE NOT EXISTS (SELECT * FROM table2 WHERE table1.id = table2.id);
Q6. Technical: SQL queries of join b/w three tables Sorting in descending order c program Full c code to print helloworld Little data structure,dbms Weakness HR: any movies or series recently watched and explain th...
read moreThe question asks for SQL queries for joining three tables, sorting in descending order in C program, and printing 'Hello, World!' in C.
To join three tables in SQL, use the JOIN keyword with appropriate conditions.
To sort in descending order in C, use the qsort() function with a custom comparison function.
To print 'Hello, World!' in C, use the printf() function with the desired message.
Q7. What do you know about OOPS?
OOPS stands for Object-Oriented Programming System.
OOPS is a programming paradigm that focuses on objects and their interactions.
It emphasizes on encapsulation, inheritance, and polymorphism.
Encapsulation is the process of hiding implementation details from the user.
Inheritance allows a class to inherit properties and methods from another class.
Polymorphism allows objects to take on multiple forms or behaviors.
Examples of OOPS languages include Java, C++, Python, and Ruby.
Q8. How flexibility can help, what are its advantages and disadvantages
Flexibility can bring advantages like adaptability and creativity, but can also lead to indecisiveness and lack of focus.
Flexibility allows for adaptability to changing situations and creativity in problem-solving.
It can also lead to indecisiveness and lack of focus if not balanced with structure and clear goals.
Advantages include increased resilience, better teamwork, and improved communication.
Disadvantages include potential for burnout and difficulty in prioritizing tasks....read more
Q9. Swapping of two variables without using temporary variables
Swapping two variables without using temporary variables.
Use arithmetic operations to swap values
X = X + Y
Y = X - Y
X = X - Y
Q10. How to add moving images in flipkart?
Moving images can be added in Flipkart by using HTML and CSS animations.
Use HTML
tag to insert the image
Apply CSS animations to create the moving effect
Use keyframes to define the animation behavior
Q11. Inverse of a number has to be found whose digits difference and sum was given.
To find the inverse of a number, calculate the difference and sum of its digits.
Iterate through each digit of the number to calculate the sum and difference.
Reverse the order of the digits to get the inverse number.
For example, if the number is 123, the sum of digits is 1+2+3=6 and the difference is 3-2-1=0. The inverse would be 321.
Q12. Logic behind tree and graphs codes?
Trees and graphs are used to represent hierarchical and non-linear relationships respectively in data structures and algorithms.
Trees are used to represent hierarchical relationships between data points, such as in file systems or organizational structures.
Graphs are used to represent non-linear relationships between data points, such as in social networks or transportation systems.
Both trees and graphs can be traversed using various algorithms, such as depth-first search or ...read more
Q13. Time complexity of nested for loop.
Time complexity of nested for loop.
The time complexity is O(n^k) where n is the size of the outer loop and k is the size of the inner loop.
Nested loops can lead to exponential time complexity.
Optimizing the inner loop can improve performance.
Q14. What is space complexity?
Space complexity refers to the amount of memory used by an algorithm.
It is a measure of how much memory an algorithm needs to solve a problem.
It is usually expressed in terms of the amount of memory used by the algorithm as a function of the size of the input.
Space complexity can be affected by the data structures used in the algorithm.
For example, an algorithm that uses a hash table will have a higher space complexity than one that uses a simple array.
Q15. What onboarding policies and details were communicated to you?
I was informed about the company's onboarding process, including orientation, training, and HR policies.
Received an employee handbook outlining company policies and procedures
Participated in orientation sessions to learn about company culture and values
Completed training on specific job responsibilities and software tools
Met with HR to discuss benefits, payroll, and other administrative details
Q16. Given an array, write a code to check which number is prime number.
Code to check prime numbers in an array
Iterate through each number in the array
For each number, check if it is divisible by any number from 2 to the square root of the number
If the number is only divisible by 1 and itself, it is a prime number
Q17. Tell me some technologies that were used in IT industry
Technologies used in IT industry include cloud computing, artificial intelligence, blockchain, and internet of things.
Cloud computing: AWS, Azure, Google Cloud
Artificial intelligence: Machine learning, natural language processing
Blockchain: Bitcoin, Ethereum
Internet of things: Smart homes, wearables
Q18. Difference between a motor and generator?
A motor converts electrical energy into mechanical energy, while a generator converts mechanical energy into electrical energy.
Motors use electrical energy to create motion, while generators use motion to create electrical energy.
Motors have a rotor and a stator, while generators have a stator and a rotor.
Examples of motors include electric fans, washing machines, and power tools, while examples of generators include wind turbines and hydroelectric dams.
Q19. 1. If this a (showed an obj) and this is b, write a code to add both and get results
Code to add two objects and get results
Use the + operator to add the values of the objects
Ensure that the objects have compatible data types for addition
Handle any potential errors or exceptions that may occur during the addition
Q20. Difference between sql and sql server?
SQL is a language used to manage databases, while SQL Server is a Microsoft product that includes a database management system.
SQL is a language used to interact with databases, while SQL Server is a Microsoft product that includes a database management system.
SQL can be used with various database management systems like MySQL, Oracle, etc., while SQL Server is specific to Microsoft.
SQL is a standard language for querying and managing databases, while SQL Server provides addi...read more
Q21. What are the benefits of using python ?
Python is a versatile programming language known for its simplicity, readability, and vast library support.
Easy to learn and use, making it ideal for beginners and experienced programmers alike
Has a large standard library with built-in modules for various tasks, reducing the need for external libraries
Supports multiple programming paradigms, including procedural, object-oriented, and functional programming
Cross-platform compatibility allows code to run on different operating ...read more
Q22. Explain react in website making?
React is a JavaScript library for building user interfaces.
React allows developers to create reusable UI components.
It uses a virtual DOM for efficient rendering.
React can be used to build single-page applications.
React is maintained by Facebook and a community of developers.
React can be combined with other libraries like Redux for state management.
Q23. What is difference between while and Do while
While loop checks the condition before executing the code block, while Do while loop executes the code block first and then checks the condition.
While loop is entry controlled, Do while loop is exit controlled
While loop may not execute at all if the condition is false initially, Do while loop executes at least once
Example: while loop - while(i < 5) { //code } vs. do { //code } while(i < 5)
Q24. Which Layer in ISO OSI Model handles security
The security layer in the ISO OSI Model is the Presentation Layer.
The Presentation Layer is responsible for encryption, decryption, and data compression.
It ensures that data is securely transmitted between applications.
Examples of security protocols at this layer include SSL (Secure Sockets Layer) and TLS (Transport Layer Security).
Q25. tell me different ways to introduce infinite loop
Different ways to introduce infinite loop in programming
Using while loop with condition that always evaluates to true
Using for loop with condition that never becomes false
Using recursion without a base case
Using goto statement to jump back to the beginning of the loop
Q26. Write a code to print your name
Code to print name
Use a print statement to output the name
Enclose the name in quotes
Separate first and last name with a space
Q27. Any questions?
Yes, I have a few questions regarding the company culture and team dynamics.
Can you tell me more about the team I will be working with?
What is the company's approach to professional development?
How does the company foster collaboration and communication among teams?
What is the company's policy on work-life balance?
Q28. What is an interpreted language
An interpreted language is a type of programming language that executes instructions directly, without the need for compilation.
Interpreted languages are executed line by line, translating each line into machine code at runtime.
Examples of interpreted languages include Python, Ruby, and JavaScript.
Interpreted languages are generally slower than compiled languages, as they do not undergo a separate compilation step.
Q29. Compile time polymorphism vs runtime polymorphism
Compile time polymorphism is method overloading while runtime polymorphism is method overriding.
Compile time polymorphism is resolved at compile time while runtime polymorphism is resolved at runtime.
Method overloading is an example of compile time polymorphism while method overriding is an example of runtime polymorphism.
Compile time polymorphism is faster than runtime polymorphism as it is resolved at compile time.
Runtime polymorphism is more flexible than compile time poly...read more
Q30. Technological advancements in distributed file systems.
Distributed file systems have advanced with features like fault tolerance, scalability, and data consistency.
Distributed file systems allow for data to be stored across multiple servers and accessed from anywhere.
Advancements include fault tolerance to ensure data availability even if a server fails.
Scalability allows for easy expansion as data storage needs grow.
Data consistency ensures that all nodes in the system have the same view of the data.
Examples of distributed file ...read more
Q31. Why is java platform independent
Java is platform independent due to its bytecode and JVM.
Java code is compiled into bytecode which is platform-neutral.
JVM (Java Virtual Machine) interprets the bytecode and executes it on any platform.
JVM acts as an abstraction layer between the code and the underlying hardware.
This allows Java programs to run on any platform that has a JVM installed.
For example, a Java program written on a Windows machine can run on a Linux machine without any modifications.
Q32. Call by value and call by reference difference
Call by value passes a copy of the value while call by reference passes the memory address of the value.
Call by value passes a copy of the value to the function while call by reference passes the memory address of the value.
In call by value, any changes made to the parameter inside the function do not affect the original value outside the function.
In call by reference, any changes made to the parameter inside the function affect the original value outside the function.
Call by...read more
Q33. what is the difference between knowldge and wisdom
Knowledge is information gained through learning, while wisdom is the ability to apply that knowledge in a meaningful way.
Knowledge is theoretical, while wisdom is practical.
Knowledge is acquired through education and experience, while wisdom is gained through reflection and introspection.
Knowledge is objective, while wisdom is subjective.
Examples: Knowing how to drive a car is knowledge, but knowing when to drive and when not to drive is wisdom. Knowing the facts about a dis...read more
Q34. How to perform type casting in Java
Type casting in Java is the process of converting one data type into another.
Use the syntax (newType) variableName to perform type casting.
Type casting can be done implicitly or explicitly.
Explicit type casting is done by the programmer and may result in data loss if the new type cannot hold the original value.
Q35. What about python language?
Python is a high-level programming language known for its simplicity and readability.
Python is widely used for web development, data analysis, artificial intelligence, and scientific computing.
It has a large standard library and supports multiple programming paradigms.
Python code is easy to read and maintain, making it a popular choice for beginners and experienced programmers alike.
Q36. Swapping of two numbers using temp variable
Swapping two numbers using a temporary variable in programming.
Declare three variables: a, b, temp.
Assign values to a and b.
Store the value of a in temp.
Assign the value of b to a.
Assign the value of temp to b.
Now a and b have been swapped.
Q37. Write a program on inheritance
A program demonstrating inheritance in programming
Inheritance allows a class to inherit properties and methods from another class
The derived class can add its own properties and methods
Inheritance promotes code reusability and modularity
Example: Creating a base class 'Animal' with properties like 'name' and 'age', and a derived class 'Dog' inheriting from 'Animal' with an additional property 'breed'
Q38. What is object oriented programming
Object oriented programming is a programming paradigm that uses objects to represent and manipulate data.
Objects encapsulate data and behavior
Classes define the blueprint for objects
Inheritance allows for the creation of subclasses with shared characteristics
Polymorphism allows for objects to take on multiple forms
Examples include Java, Python, and C++
Q39. 4 pillars of object oriented programming
The 4 pillars of OOP are Abstraction, Encapsulation, Inheritance, and Polymorphism.
Abstraction: Hiding implementation details and showing only necessary information.
Encapsulation: Binding data and functions together to protect data from outside interference.
Inheritance: Creating new classes from existing ones, inheriting properties and methods.
Polymorphism: Using a single interface to represent multiple types of objects.
Q40. Difference between java and c++
Java is platform-independent, while C++ is not. Java uses automatic memory management, while C++ requires manual memory management.
Java is platform-independent, meaning that Java programs can run on any operating system that has a Java Virtual Machine (JVM). C++ programs, on the other hand, are compiled into machine code specific to the target platform.
Java uses automatic memory management through garbage collection, which automatically frees up memory that is no longer neede...read more
Q41. Explain normalisation and types
Normalization is the process of organizing data in a database to eliminate redundancy and improve data integrity.
Normalization is used to minimize data duplication and ensure consistency.
There are different normal forms (1NF, 2NF, 3NF, etc.) that define specific rules for organizing data.
Normalization helps in reducing data anomalies and improving database performance.
Normalization involves breaking down a large table into smaller, more manageable tables.
Each normal form has ...read more
Q42. When and how to use functions?
Functions are used to break down complex tasks into smaller, reusable parts.
Functions should be used when a task needs to be performed multiple times in a program.
Functions make code more organized and easier to read.
Functions can take parameters and return values to make them more versatile.
Functions can be used to break down complex tasks into smaller, more manageable parts.
Functions can be used to improve code reusability and reduce redundancy.
Q43. How to use static in class?
Static keyword is used to create class-level variables and methods that can be accessed without creating an instance of the class.
Static variables and methods are declared using the keyword 'static'
Static variables are shared among all instances of the class
Static methods can be called without creating an instance of the class
Static methods cannot access non-static variables or methods
Example: public static int count = 0; // static variable
Example: public static void printCou...read more
Q44. Difference between C and C++
C is a procedural programming language, while C++ is an extension of C with added features like object-oriented programming.
C is a procedural language, while C++ supports both procedural and object-oriented programming.
C++ has additional features like classes, inheritance, and polymorphism.
C++ supports function overloading and exception handling, which are not available in C.
C++ has a standard template library (STL) that provides useful data structures and algorithms.
C++ allo...read more
Q45. What are key constraints ?
Key constraints are rules that enforce uniqueness and relationships in a database.
Key constraints ensure that each record in a table is uniquely identified.
Primary key constraint enforces uniqueness and ensures each record has a unique identifier.
Foreign key constraint establishes a relationship between two tables based on a key field.
Unique key constraint ensures that all values in a column are unique.
Q46. Explain SQL join statements
SQL join statements are used to combine rows from two or more tables based on a related column between them.
Join statements are used to retrieve data from multiple tables in a single query.
Common types of join statements include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN.
Join conditions are specified using the ON keyword followed by the columns to join on.
Join statements can be used to fetch related data from different tables based on a common column.
Example: SELECT * F...read more
Q47. OOP oriented in the case of C++
C++ supports Object-Oriented Programming (OOP) through classes and objects.
C++ allows for the creation of classes, which are user-defined data types that can have member functions and variables.
Objects are instances of classes, allowing for data encapsulation and abstraction.
Inheritance, polymorphism, and encapsulation are key principles of OOP supported by C++.
Q48. Programming code for Fibonacci series
Fibonacci series is a sequence of numbers where each number is the sum of the two preceding ones.
Start with two variables, a and b, initialized to 0 and 1 respectively
Loop through the desired number of iterations and calculate the next number in the sequence by adding a and b
Assign the value of b to a and the value of the new number to b
Repeat until desired number of iterations is reached
Q49. Write a c program reversing your name
A C program to reverse a given name.
Declare a character array to store the name.
Use scanf() to take input of the name.
Use strlen() function to find the length of the name.
Use a for loop to iterate through the name in reverse order.
Print the reversed name using printf().
Q50. Difference between DBMS and RDBMS
DBMS is a software system to manage databases while RDBMS is a type of DBMS that stores data in tables with relations.
DBMS stands for Database Management System while RDBMS stands for Relational Database Management System.
DBMS can manage any type of database while RDBMS manages only relational databases.
DBMS does not enforce any specific data model while RDBMS enforces the relational data model.
Examples of DBMS include MongoDB, Cassandra, and Redis while examples of RDBMS inc...read more
Q51. difference between list and tuple
List is mutable while tuple is immutable in Python.
Lists are enclosed in square brackets [], while tuples are enclosed in parentheses ().
Elements in a list can be changed, added, or removed, while elements in a tuple cannot be changed.
Lists are used for collections of homogeneous items, while tuples are used for heterogeneous items.
Lists are slower than tuples in terms of performance.
Example: my_list = [1, 2, 3] and my_tuple = (4, 5, 6)
Q52. OOPs concepts explanation with examples
OOPs concepts are fundamental principles in object-oriented programming that help in organizing code efficiently.
Encapsulation: Bundling data and methods that operate on the data into a single unit (class). Example: Class Car with properties like make, model, and methods like start(), stop().
Inheritance: Ability of a class to inherit properties and behavior from another class. Example: Class SUV inheriting from Class Car.
Polymorphism: Ability to present the same interface for...read more
Q53. 1. What is polymorphism
Polymorphism is the ability of a function or method to behave differently based on the object it is acting upon.
Polymorphism allows objects of different classes to be treated as objects of a common superclass.
There are two types of polymorphism: compile-time (method overloading) and runtime (method overriding).
Example: Inheritance in OOP allows a child class to override a method from its parent class, exhibiting polymorphic behavior.
Q54. What is Polymorphism
Polymorphism is the ability of a single function or method to operate on different types of data.
Polymorphism allows objects of different classes to be treated as objects of a common superclass.
There are two types of polymorphism: compile-time (method overloading) and runtime (method overriding).
Example: Inheritance in object-oriented programming languages like Java allows for polymorphism.
Q55. What is String? What is DBMS?
String is a sequence of characters. DBMS is a software system that manages databases.
String is a data type used to represent text in programming languages.
DBMS stands for Database Management System.
String example: 'Hello, World!'
DBMS example: MySQL, Oracle, SQL Server
Q56. What is python?
Python is a high-level programming language known for its simplicity and readability.
Python is interpreted, not compiled
It supports multiple programming paradigms like procedural, object-oriented, and functional programming
Python has a large standard library and a vibrant community for support
Example: print('Hello, World!') is a simple Python program that prints 'Hello, World!' to the console
Q57. What is Captcha?
Captcha is a security measure used to determine whether a user is human or a bot by presenting a challenge that is easy for humans to solve but difficult for bots.
Captcha stands for Completely Automated Public Turing test to tell Computers and Humans Apart.
It typically involves distorted text that the user must enter correctly to proceed.
Captcha can also include image recognition tasks or simple puzzles.
Captcha helps prevent automated bots from accessing websites or submittin...read more
Q58. C program for even and odd
A C program to determine if a number is even or odd.
Use the modulo operator to check if the number is divisible by 2.
If the remainder is 0, the number is even. Otherwise, it is odd.
Print the result to the console or store it in a variable for later use.
Q59. Define OOPS concepts
OOPS concepts are fundamental principles in object-oriented programming that help in designing and implementing software solutions.
Encapsulation: Bundling data and methods together in a class to hide implementation details.
Inheritance: Creating new classes by inheriting properties and behaviors from existing classes.
Polymorphism: Ability of objects to take on many forms and perform different actions based on the context.
Abstraction: Simplifying complex systems by breaking the...read more
Q60. What is Type casting
Type casting is the process of converting a variable from one data type to another.
Type casting can be implicit or explicit.
Implicit type casting is done automatically by the compiler.
Explicit type casting requires the programmer to specify the conversion.
Example: converting an integer to a float in order to perform division with decimal precision.
Q61. Swapping of two numbers
Swapping two numbers involves exchanging the values of two variables.
Create a temporary variable to store one of the numbers
Assign the value of the first number to the second number
Assign the value of the temporary variable to the first number
Q62. what is sap abap
SAP ABAP is a high-level programming language used for developing applications on the SAP platform.
ABAP stands for Advanced Business Application Programming.
It is primarily used for developing business applications in SAP environments.
ABAP programs can be executed on the SAP NetWeaver Application Server.
Common use cases include report generation, data manipulation, and interface development.
Example: Creating custom reports to analyze sales data in SAP.
Q63. What is workflow
Workflow is a sequence of tasks or processes that define how work is completed within an organization.
Defines the steps needed to complete a task, e.g., processing a loan application.
Can be automated using software tools, like project management systems.
Involves roles and responsibilities, ensuring accountability, e.g., who approves a document.
Can be visualized using flowcharts to illustrate the process, e.g., customer service escalation.
Helps in identifying bottlenecks and i...read more
Q64. Define OOPS Concept
OOPS (Object-Oriented Programming) is a programming paradigm based on the concept of objects, which can contain data and code.
OOPS focuses on creating objects that interact with each other to solve complex problems
It involves concepts like inheritance, encapsulation, polymorphism, and abstraction
Example: Inheritance allows a class to inherit properties and methods from another class, reducing code duplication
More about working at Cognizant
Top HR Questions asked in Nitstone Finserv
Interview Process at Nitstone Finserv
Top Programmer Analyst Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month