Ninja
50+ Ninja Interview Questions and Answers for Freshers
Q1. You have done a lot of courses in coursera and NPTEL. What is the use of it?
Courses in Coursera and NPTEL provide knowledge and skills in various fields.
Courses in Coursera and NPTEL offer a wide range of topics to learn from.
They provide access to high-quality education from top universities and institutions.
The courses help in developing new skills and enhancing existing ones.
They can be useful for career advancement and personal growth.
For example, a course in data science can help in analyzing and interpreting data for business decisions.
Similarl...read more
Q2. Is it a software project? Which software or language did you use?
Yes, it is a software project. We used multiple languages including Python, Java, and C++.
The project involved developing a web application using Python and Django framework.
We also used Java for developing the backend of the application.
C++ was used for developing some of the algorithms used in the project.
Other technologies used include HTML, CSS, and JavaScript.
We followed agile methodology for development and used Git for version control.
Q3. You have done a course in Neural Networks right? What are neural networks?
Neural networks are a type of machine learning algorithm inspired by the structure and function of the human brain.
Neural networks consist of layers of interconnected nodes that process information.
They are trained on a dataset to learn patterns and make predictions.
They can be used for tasks such as image recognition, natural language processing, and predictive analytics.
Examples include convolutional neural networks for image classification and recurrent neural networks for...read more
Q4. If an application designed by you does not runs on PC, is it your fault or PCs fault?
It could be either my fault or the PC's fault depending on the circumstances.
If the application was designed to run on a specific operating system or hardware configuration and the PC does not meet those requirements, it would be the PC's fault.
If the application has bugs or errors in the code, it would be my fault.
If the PC has outdated software or hardware that cannot support the application, it would be the PC's fault.
If the application requires certain settings or configu...read more
Q5. In the given series: 0,0,2,1,4,2,6,3,8,4,10,5,12,6,14,7,16,8 Write a program to find the nth term in this series.
Program to find the nth term in a given series.
The series follows a pattern of even and odd numbers multiplied by the position of the term.
Use a loop to generate the series and return the nth term.
For n=5, the output should be 4.
Q6. What is Abstraction ? Explain with example
Abstraction is the process of hiding complex details and showing only essential features.
Abstraction helps in reducing complexity and increasing efficiency.
It allows us to focus on the important aspects of an object or system.
For example, a car can be abstracted as a mode of transportation with certain features like speed, fuel efficiency, and safety.
Abstraction can be achieved through encapsulation and inheritance in object-oriented programming.
Share interview questions and help millions of jobseekers 🌟
Q7. Write a function that takes an array called scores and 2 pointer parameters min and max and determines the minimum and maximum values and returns them to the calling function.
A function to find minimum and maximum values in an array using pointer parameters.
Declare two variables to hold minimum and maximum values
Loop through the array and compare each element with the current minimum and maximum values
Update the minimum and maximum values accordingly
Return the minimum and maximum values
Q8. In a string given reduce the size of the string using mathematical logic.
Use mathematical logic to reduce the size of a given string.
Consider using compression algorithms like Huffman coding or Lempel-Ziv-Welch.
Look for patterns or repetitions in the string that can be represented more efficiently.
Consider using mathematical formulas or equations to represent the string.
Ninja Jobs
0Q9. What is the difference between lists and tuples?
Lists are mutable while tuples are immutable in Python.
Lists use square brackets [] while tuples use parentheses ().
Elements in a list can be added, removed, or modified while elements in a tuple cannot be modified.
Lists are used for collections of data that need to be modified while tuples are used for collections of data that should not be modified.
Example of a list: my_list = [1, 2, 3]
Example of a tuple: my_tuple = (1, 2, 3)
Q10. Describe cloud computing in detail and what are its models?
Cloud computing is the delivery of computing services over the internet.
Cloud computing allows users to access data and applications from anywhere with an internet connection.
There are three main models of cloud computing: Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS).
IaaS provides virtualized computing resources, such as servers and storage, over the internet.
PaaS provides a platform for developers to build and deploy appl...read more
Q11. What is Sdlc? And difference between waterfall and agile
SDLC stands for Software Development Life Cycle. Waterfall and Agile are two different approaches to SDLC.
SDLC is a process followed by software development teams to design, develop, and test high-quality software.
Waterfall is a linear approach where each phase of the SDLC must be completed before moving on to the next phase.
Agile is an iterative approach where the development team works in short sprints to deliver working software quickly and continuously improve it.
Waterfal...read more
Q12. Write a code to capitalize the first and last letter of each word into uppercase.
Code to capitalize first and last letter of each word into uppercase.
Split the string into words using split() method
Loop through each word and capitalize the first and last letter using slice() and toUpperCase() methods
Join the modified words back into a string using join() method
Q13. What is public static void main in java?
public static void main is the entry point of a Java program.
It is a method that is called when the program starts.
It must be declared as public, static, and void.
It takes an array of strings as an argument.
It is where the program's execution begins.
Example: public static void main(String[] args) { }
Q14. 1. what is open loop and close loop system. 2. Air conditioning system is which type of system. 3.what is object. 4.If data member is in class is protected can we acess to derived class.
Answers to technical questions related to open loop and closed loop systems, air conditioning, object, and data member access in derived classes.
Open loop system is a system where the output is not controlled by the input, while closed loop system is a system where the output is controlled by the input.
Air conditioning system is a closed loop system as it maintains a constant temperature by adjusting the input based on the output.
An object is an instance of a class that has i...read more
Q15. what is an array and pointers?
An array is a collection of similar data types stored in contiguous memory locations. A pointer is a variable that stores the memory address of another variable.
Arrays are accessed using index numbers, while pointers are accessed using the * and & operators.
Arrays can be passed to functions as arguments, while pointers can be used to pass the address of a variable to a function.
Arrays can be initialized with values at the time of declaration, while pointers need to be assigne...read more
Q16. What is a Dictionary?
A dictionary is a collection of words and their meanings.
It is used to look up the meaning of a word.
It can also include synonyms, antonyms, and pronunciation guides.
Examples include Merriam-Webster, Oxford English Dictionary, and Urban Dictionary.
Q17. What was your Btech project?
I am an AI language model and do not have a Btech project.
Q18. .What is Encapsulation?
Encapsulation is the process of hiding implementation details and exposing only necessary information.
Encapsulation is a fundamental concept in object-oriented programming.
It helps in achieving data abstraction and information hiding.
It allows for better control over the data and prevents unauthorized access.
For example, a class can have private variables and public methods to access them.
This way, the internal details of the class are hidden from the outside world.
Q19. What is polymorphism?
Polymorphism is the ability of an object to take on many forms.
It allows objects of different classes to be treated as if they were objects of the same class.
It is achieved through method overriding and method overloading.
Example: A shape class can have different subclasses like circle, square, and triangle, each with their own implementation of the draw method.
Example: A method can take in different types of objects as parameters, as long as they share a common interface or ...read more
Q20. Can an array store different elements?
Yes, an array can store different elements of different data types.
Arrays can store elements of different data types such as strings, numbers, and booleans.
For example, an array can store ['apple', 5, true, 'banana']
However, it is not recommended to mix data types in an array as it can lead to confusion and errors.
Q21. Can foreign keys store null values?
Yes, foreign keys can store null values.
A foreign key can be set to NULL if the corresponding record in the parent table is deleted or updated.
This can be useful in cases where the relationship between the tables is optional.
However, it is important to ensure that the foreign key constraint is properly defined to avoid data inconsistencies.
Q22. Differentiate between tuple and dictionary What is a list
A list is a collection of ordered and changeable elements of any data type in Python.
Lists are created using square brackets []
Elements in a list are separated by commas
Lists can contain duplicates and elements of different data types
Q23. What is OS?
OS stands for Operating System, which is a software that manages computer hardware and software resources.
OS acts as an interface between the user and the computer hardware.
It manages memory, processes, and input/output devices.
Examples of OS include Windows, macOS, Linux, and Android.
OS determines the type of software that can be run on a computer.
It provides security features to protect the system from malware and unauthorized access.
Q24. What is SDLC?
SDLC stands for Software Development Life Cycle. It is a process used to design, develop, and test software applications.
SDLC is a structured approach to software development.
It consists of several phases including requirements gathering, design, coding, testing, and maintenance.
Each phase has specific activities and deliverables.
SDLC helps ensure that software is developed efficiently and meets the needs of users.
Examples of SDLC models include Waterfall, Agile, and DevOps.
Q25. explain diff b/w osi/iso and tcp/ip model
OSI/ISO and TCP/IP models are both networking models, but differ in their layer structure and protocols used.
OSI/ISO has 7 layers while TCP/IP has 4 layers
OSI/ISO is a theoretical model while TCP/IP is a practical model
OSI/ISO uses protocols such as X.25 and ISDN while TCP/IP uses protocols such as HTTP and FTP
OSI/ISO is more complex and difficult to implement than TCP/IP
Q26. What is cloud computing?
Cloud computing is the delivery of computing services over the internet.
Cloud computing allows users to access data and applications from anywhere with an internet connection.
It eliminates the need for physical servers and hardware, reducing costs and increasing scalability.
Examples include Amazon Web Services, Microsoft Azure, and Google Cloud Platform.
Q27. What is IOT?
IOT stands for Internet of Things. It refers to the network of physical devices, vehicles, home appliances, and other items embedded with sensors, software, and connectivity.
IOT enables devices to communicate with each other and with humans over the internet.
It allows for remote monitoring and control of devices and systems.
Examples include smart homes, wearable technology, and industrial automation.
IOT has the potential to improve efficiency, reduce costs, and enhance safety...read more
Q28. What is DBMS?
DBMS stands for Database Management System. It is a software system that manages and organizes data in a database.
DBMS is used to create, modify, and delete databases and their objects.
It provides a way to store and retrieve data efficiently.
Examples of DBMS include MySQL, Oracle, and Microsoft SQL Server.
Q29. 3) What is malloc and calloc?
malloc and calloc are functions used for dynamic memory allocation in C programming language.
malloc() allocates a block of memory of specified size and returns a pointer to the first byte of the allocated memory.
calloc() allocates a block of memory of specified size and initializes all the bytes to zero.
Both functions are used to allocate memory dynamically during runtime.
The memory allocated by these functions must be freed using the free() function to avoid memory leaks.
Q30. Polymorphism It's types
Polymorphism refers to the ability of objects to take on multiple forms.
Polymorphism can be achieved through method overloading and method overriding.
Method overloading allows multiple methods with the same name but different parameters.
Method overriding allows a subclass to provide its own implementation of a method already defined in its superclass.
Polymorphism allows for more flexible and reusable code.
Example: Animal class with a method called makeSound(). Subclasses like...read more
Q31. what is diff b/w c and c++
C++ is an extension of C with added features like object-oriented programming, templates, and exception handling.
C++ supports object-oriented programming while C does not.
C++ has templates for generic programming while C does not.
C++ has exception handling while C does not.
C++ has a standard library that includes the C standard library.
C++ allows function overloading while C does not.
Q32. Any location preferences?
I prefer locations with a vibrant gaming community and good internet connectivity.
Preferably in a city with a lot of gaming events and tournaments
Good internet connectivity is a must-have for streaming and online gaming
Examples: Los Angeles, Tokyo, Seoul
Q33. What is big data?
Big data refers to large and complex data sets that cannot be processed using traditional data processing methods.
Big data involves the collection, storage, and analysis of massive amounts of data
It requires advanced technologies and tools to process and make sense of the data
Examples of big data include social media data, sensor data, and financial transaction data
Q34. Find the maximum element from a given list
To find the maximum element from a given list.
Iterate through the list and compare each element with a variable storing the maximum value.
Update the variable if a larger element is found.
Return the maximum value at the end.
Q35. what is the computer networking
Computer networking is the practice of connecting devices together to share resources and communicate with each other.
Computer networking involves the use of hardware and software to connect devices together, such as computers, printers, and servers.
Networking protocols, such as TCP/IP, are used to facilitate communication between devices.
Examples of computer networking include local area networks (LANs), wide area networks (WANs), and the internet.
Networking can also involve...read more
Q36. Why TCS?
TCS is a global IT services company with a strong reputation for innovation and customer satisfaction.
TCS has a proven track record of delivering high-quality IT services to clients around the world.
TCS is known for its innovative approach to technology and its ability to stay ahead of the curve.
TCS has a strong focus on customer satisfaction and works closely with clients to understand their needs and deliver customized solutions.
TCS offers a wide range of services, includin...read more
Q37. Code to write Armstrong number.
Armstrong number is a number that is equal to the sum of its own digits each raised to the power of the number of digits.
Iterate through each digit of the number
Raise each digit to the power of the number of digits
Sum up the results
Check if the sum is equal to the original number
Q38. Difference between C & C++
C++ is an extension of C with object-oriented programming features.
C++ supports classes and objects while C does not.
C++ has better support for polymorphism and inheritance.
C++ has a standard template library (STL) which provides useful data structures and algorithms.
C++ allows function overloading while C does not.
C++ has exception handling while C does not.
Q39. What are pointers?
Pointers are variables that store memory addresses of other variables. They allow direct manipulation of memory.
Pointers are declared using the * symbol.
They can be used to pass variables by reference.
Pointers can be used to dynamically allocate memory.
Example: int *ptr; ptr = # *ptr = 10;
Example: void swap(int *a, int *b) { int temp = *a; *a = *b; *b = temp; }
Q40. What is an array?
An array is a collection of elements of the same data type, stored in contiguous memory locations.
Arrays can be of any data type, including integers, floats, and objects.
Elements in an array can be accessed using their index number.
Arrays can be multidimensional, with each dimension representing a different set of elements.
Arrays can be dynamically resized in some programming languages.
Example: string[] names = {"John", "Jane", "Bob"};
Q41. 2) Difference between array and pointer.
Array is a collection of similar data types while pointer is a variable that stores the memory address of another variable.
Array name represents the base address of the array while pointer stores the address of a variable.
Array size is fixed while pointer size depends on the data type it points to.
Array elements can be accessed using index while pointer needs to be dereferenced to access the value.
Example: char arr[5] = {'a', 'b', 'c', 'd', 'e'}; char *ptr = arr;
Example: int ...read more
Q42. Write a program on reverse of number?
A program to reverse a given number.
Take input number from user
Initialize a variable to store the reversed number
Extract the last digit of the input number using modulo operator and add it to the reversed number
Remove the last digit from the input number using integer division
Repeat the above two steps until input number becomes zero
Print the reversed number
Q43. Polymorphism examples
Polymorphism is the ability of an object to take on many forms. It allows objects of different classes to be treated as the same type.
Polymorphism is achieved through method overriding and method overloading.
Example of method overriding: a superclass Animal with a method 'makeSound', and subclasses Dog and Cat that override the 'makeSound' method.
Example of method overloading: a class Calculator with multiple methods named 'add' that accept different parameters.
Polymorphism p...read more
Q44. Give me unique values in a column (sql)
Use the DISTINCT keyword in SQL to retrieve unique values in a column.
Use the SELECT DISTINCT statement followed by the column name to retrieve unique values.
For example, SELECT DISTINCT column_name FROM table_name;
You can also use GROUP BY to get unique values in a column.
Q45. Swap 2 numbers without 3rd variable
To swap two numbers without a third variable, use arithmetic operations.
Use addition and subtraction to swap the numbers
Example: a = 5, b = 10. a = a + b (a = 15), b = a - b (b = 5), a = a - b (a = 10)
Q46. What is inheritance? Explain
Inheritance is a concept in object-oriented programming where a class inherits properties and behaviors from another class.
Inheritance allows for code reuse and promotes modularity.
The class that is being inherited from is called the superclass or base class.
The class that inherits from the superclass is called the subclass or derived class.
The subclass inherits all the public and protected members of the superclass.
Inheritance can be single, where a subclass inherits from on...read more
Q47. example of function overriding
Function overriding is when a subclass provides a different implementation of a method that is already defined in its superclass.
The method in the subclass must have the same name, return type, and parameters as the method in the superclass.
The method in the subclass must have a higher or same level of access as the method in the superclass.
Example: class Animal { void makeSound() { System.out.println('Animal sound'); } } class Dog extends Animal { void makeSound() { System.o...read more
Q48. Write a Plindrome Code
A palindrome code reads the same forwards and backwards.
Create a function that compares the original string with its reverse
Use built-in functions like reverse() or loop through the string to create the reversed version
Handle cases where spaces or punctuation may be present in the string
Q49. Can you explain oops concepts
OOPs concepts refer to Object-Oriented Programming principles like Inheritance, Encapsulation, Polymorphism, and Abstraction.
Inheritance: Allows a class to inherit properties and behavior from another class. Example: Parent class 'Animal' and child class 'Dog'.
Encapsulation: Bundling data and methods that operate on the data into a single unit. Example: Class 'Car' with private variables and public methods.
Polymorphism: Ability to present the same interface for different data...read more
Q50. DDL and DML difference
DDL is used to create, modify or delete database objects while DML is used to manipulate data within those objects.
DDL stands for Data Definition Language and includes commands like CREATE, ALTER, DROP, etc.
DML stands for Data Manipulation Language and includes commands like SELECT, INSERT, UPDATE, DELETE, etc.
DDL commands are used to create, modify or delete database objects like tables, indexes, etc.
DML commands are used to manipulate data within those objects like insertin...read more
Top Interview Questions for Ninja Related Skills
Interview experiences of popular companies
Calculate your in-hand salary
Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary
Reviews
Interviews
Salaries
Users/Month