Programmer Analyst Trainee
200+ Programmer Analyst Trainee Interview Questions and Answers
Q101. What is JVM,JDK,Abstraction?
JVM is a virtual machine that executes Java bytecode. JDK is a software development kit for Java. Abstraction is a concept of hiding implementation details.
JVM stands for Java Virtual Machine and is responsible for executing Java bytecode.
JDK stands for Java Development Kit and is a software development kit for Java.
Abstraction is a concept of hiding implementation details and exposing only necessary information.
Abstraction is achieved through interfaces and abstract classes ...read more
Q102. What is polymorphism?
Polymorphism is the ability of an object to take on many forms.
Polymorphism allows objects of different classes to be treated as if they are of the same class.
It can be achieved through method overloading or method overriding.
Example: A parent class Animal can have child classes like Dog, Cat, and Cow. All of them can have a method called 'makeSound', but each of them will make a different sound.
Polymorphism helps in achieving code reusability and flexibility.
Q103. Write a program for a number is prime or not
Program to check if a number is prime or not
A prime number is only divisible by 1 and itself
Loop through numbers from 2 to n-1 and check if n is divisible by any of them
If n is divisible by any number, it is not prime
If n is not divisible by any number, it is prime
Q104. Write any program demonstrating the use of the Double pointer.
A program demonstrating the use of Double pointer.
Double pointer is a pointer that points to another pointer.
It is used to allocate memory dynamically.
It is also used in multi-dimensional arrays.
Example: int **ptr; //declaration of double pointer
Q105. What are lists? What are data structures?
Lists are a collection of ordered elements. Data structures are ways of organizing and storing data.
Lists are used to store and manipulate data in a specific order.
Data structures are used to organize and store data in a way that makes it easy to access and manipulate.
Examples of data structures include arrays, stacks, queues, and trees.
Q106. Difference between oop and pop.
OOP is Object-Oriented Programming and POP is Procedural-Oriented Programming.
OOP focuses on objects and classes, promoting code reusability and modularity.
POP focuses on procedures and functions, with a linear flow of execution.
OOP allows for encapsulation, inheritance, and polymorphism.
POP is simpler and more straightforward, suitable for smaller programs.
Examples of OOP languages include Java, C++, and Python.
Examples of POP languages include C, Pascal, and Fortran.
Share interview questions and help millions of jobseekers 🌟
Q107. Wap to find Prime Number
A prime number is a number that is only divisible by 1 and itself.
Start by checking if the number is less than 2, as prime numbers start from 2.
Iterate from 2 to the square root of the number and check if any number divides it evenly.
If no number divides it evenly, then it is a prime number.
Q108. What are different types of loops in c
There are three types of loops in C: for, while, and do-while.
For loop is used when the number of iterations is known beforehand.
While loop is used when the number of iterations is not known beforehand.
Do-while loop is similar to while loop, but it executes the code block at least once before checking the condition.
Q109. Difference between union and union all
Union combines and removes duplicates, Union All combines all rows including duplicates.
Union is used to combine the result sets of two or more SELECT statements into a single result set.
Union removes duplicates from the result set.
Union All combines all rows from the result sets of two or more SELECT statements, including duplicates.
Union is slower than Union All as it has to remove duplicates.
Example: SELECT column1 FROM table1 UNION SELECT column1 FROM table2;
Example: SELE...read more
Q110. Insert node in Linked list at tail ?
To insert a node at the tail of a linked list, traverse the list to the end and add the new node.
Traverse the linked list to the end
Create a new node with the given data
Set the next pointer of the last node to the new node
Set the new node's next pointer to NULL
Q111. Can you reverse a string ?
Yes, a string can be reversed by iterating through the characters and swapping them from start to end.
Iterate through the characters of the string from start to end
Swap the characters at the start and end positions until reaching the middle
Example: 'hello' can be reversed to 'olleh'
Q112. 1 aptitude problem What are pointers Explain OOPS Concepts
Pointers are variables that store memory addresses of other variables. OOPS concepts include inheritance, polymorphism, encapsulation, and abstraction.
Pointers are used to store memory addresses of variables.
They allow for dynamic memory allocation and deallocation.
Example: int *ptr; ptr = # // ptr now stores the memory address of num
Q113. Explain OOPs concept, projects that you've worked on, etc
OOPs concept involves creating classes, objects, inheritance, polymorphism, and encapsulation. I have worked on projects using Java and C++.
OOPs concept includes classes, objects, inheritance, polymorphism, and encapsulation
I have worked on projects using Java and C++ which involved implementing OOPs principles
One project involved creating a banking system using Java classes and inheritance
Q114. Have you heard of Blockchain?
Yes, Blockchain is a decentralized digital ledger technology used for secure and transparent transactions.
Blockchain is a distributed database that stores information across a network of computers
It uses cryptography to secure and verify transactions
It is used in cryptocurrencies like Bitcoin and Ethereum
It has potential applications in various industries like finance, healthcare, and supply chain management
Q115. What is sql code
SQL code is a programming language used to manage and manipulate relational databases.
SQL stands for Structured Query Language
SQL code is used to create, modify, and query databases
Examples of SQL code include SELECT, INSERT, UPDATE, and DELETE statements
Q116. Write a code to explain method overriding.
Method overriding is when a subclass provides a specific implementation of a method that is already provided by its parent class.
In method overriding, the method in the subclass has the same name, return type, and parameters as the method in the parent class.
The overridden method in the subclass should have the same or broader access modifier than the method in the parent class.
Example: class Animal { void sound() { System.out.println('Animal sound'); } } class Dog extends An...read more
Q117. Write a code to find factorial of a number.
Code to find factorial of a number
Use a loop to multiply numbers from 1 to the given number
Handle edge cases like 0 and negative numbers
Factorial of 0 is 1
Q118. What is the data type of 0 and 1
0 and 1 are integers and their data type is typically 'int' in programming languages.
Data type of 0 and 1 is 'int' in most programming languages like C, C++, Java, etc.
In some languages like Python, 0 and 1 are considered as 'bool' type for boolean values.
In SQL, 0 and 1 can be used as values for boolean data types like 'BIT'.
Q119. Code of square root of any number in c++
Code for square root of any number in C++
Include the
library Use the sqrt() function to calculate the square root
Example: double result = sqrt(25);
Print the result using cout or printf
Q120. What are constructors?
Constructors are special methods used to initialize objects in a class.
Constructors have the same name as the class they belong to.
They are called automatically when an object is created.
Constructors can have parameters to initialize object properties.
They can be overloaded to have multiple versions with different parameters.
Constructors can also call other constructors using the 'this' keyword.
Q121. Write the code of Fibonacci series in c
Fibonacci series is a sequence of numbers where each number is the sum of the two preceding ones.
Declare variables for first, second and next numbers
Initialize first and second numbers as 0 and 1 respectively
Use a loop to generate the next number by adding the previous two numbers
Print the generated numbers
Q122. Difference between c and python
C is a compiled language with low-level memory access while Python is an interpreted language with high-level data structures.
C is faster and more efficient for low-level programming
Python is easier to learn and has a simpler syntax
C requires manual memory management while Python has automatic garbage collection
Python has built-in support for high-level data structures like lists and dictionaries
C is commonly used for system programming and embedded systems while Python is us...read more
Q123. Swap two number without using pointer?
Swapping two numbers without using pointers
Use arithmetic operations to swap the values
Use XOR operator to swap the values
Use temporary variable to swap the values
Q124. Explain project with real world application.
Developed a mobile app for tracking daily water intake to promote hydration.
Designed user-friendly interface for inputting water consumption
Implemented reminder notifications to encourage regular hydration
Utilized database to store user data for tracking and analysis
Q125. What is microservies and explain it
Microservices are a software development technique where applications are composed of small, independent services that communicate over well-defined APIs.
Microservices break down applications into smaller, loosely coupled services
Each service is responsible for a specific function and can be developed, deployed, and scaled independently
Communication between services is typically done through APIs, often using lightweight protocols like HTTP or messaging queues
Microservices ar...read more
Q126. What are the types of exception
Types of exceptions include checked, unchecked, error, and runtime exceptions.
Checked exceptions are checked at compile time and must be handled by the programmer.
Unchecked exceptions are not checked at compile time and can be handled or left to propagate.
Errors are exceptional conditions that are not expected to be caught or handled by the programmer.
Runtime exceptions are unchecked exceptions that occur at runtime, often due to programming errors.
Q127. Remove duplicate words from a given string.
Remove duplicate words from a given string.
Split the string into an array of words
Use a Set to store unique words
Join the Set back into a string
Q128. say ABT PROJECT any software skills acquired
I have acquired software skills in Java, SQL, and Python through various projects.
Proficient in Java programming language
Experience with SQL databases
Familiar with Python scripting
Q129. Swap Two no. without using third variable.
Swap two numbers without using a third variable
Use arithmetic operations to swap the numbers
Example: a = 5, b = 10. After swapping, a = 10, b = 5
Q130. Swapping 2 numbers without using a third variable
Swapping 2 numbers without using a third variable can be done using 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)
Q131. Basic Algorithms in day-to-day life used.
Basic algorithms are used in everyday tasks like sorting, searching, and decision making.
Sorting items in a grocery list
Searching for a specific contact in a phonebook
Making decisions based on traffic patterns
Calculating the shortest route to a destination
Finding the highest or lowest value in a set of data
Q132. Write a basic if-else condition code.
If-else condition code example
Use if keyword followed by a condition in parentheses
Use curly braces to enclose the code to be executed if the condition is true
Use else keyword followed by curly braces to enclose the code to be executed if the condition is false
The else block is optional
Example: if(age > 18) { System.out.println('You are an adult'); } else { System.out.println('You are a minor'); }
Q133. Write a code for addition of numbers
Code for addition of numbers using a simple function
Create a function that takes in two numbers as parameters
Add the two numbers together and return the result
Example: function addNumbers(num1, num2) { return num1 + num2; }
Q134. How do you handle pressured situatiom
I handle pressured situations by staying calm, prioritizing tasks, and seeking support when needed.
Stay calm and composed
Prioritize tasks based on urgency and importance
Break down complex problems into smaller manageable tasks
Seek support and guidance from colleagues or mentors
Take short breaks to relax and refocus
Maintain open communication with team members and stakeholders
Q135. doyou know anything related to coding
Yes, I have experience in coding languages such as Java, Python, and SQL.
Proficient in Java for backend development
Familiar with Python for data analysis and scripting
Experience with SQL for database management
Q136. Remove duplicates in Linked List
Remove duplicates in a Linked List
Traverse the linked list and keep track of visited nodes
If a node is visited again, remove it from the list
Use a hash table to keep track of visited nodes for faster lookup
Q137. What is markup language?
Markup language is a computer language that uses tags to define elements within a document.
Markup languages are used to create and format content for the web.
HTML, XML, and XHTML are examples of markup languages.
Tags are used to define the structure and appearance of content.
Markup languages are not programming languages, but rather descriptive languages.
Markup languages are human-readable and machine-readable.
Q138. Why we use capacitance
Capacitance is used to store electrical energy in an electric field.
Capacitance is used in electronic circuits to filter out noise and stabilize voltage.
It is also used in touchscreens and trackpads to detect touch and movement.
Capacitors are used in power factor correction to improve the efficiency of electrical systems.
Capacitance is measured in farads, with smaller values measured in microfarads and picofarads.
Q139. Explain whole project in detail
The project is a web-based inventory management system for a retail company.
Developed using Java Spring framework for backend and Angular for frontend
Includes features such as product management, order processing, and reporting
Utilizes MySQL database for storing data
Implemented user authentication and authorization for security
Integrated with third-party payment gateway for online transactions
Q140. What is meant by variable ?
A variable is a named storage location in a program that can hold a value which can be changed during program execution.
Variables are used to store data in a program.
They have a name, a data type, and a value.
The value of a variable can be changed during program execution.
Variables can be used in calculations and to control program flow.
Examples of variables include integers, floating-point numbers, and strings.
Q141. What is resistance?
Resistance is the opposition to the flow of electric current.
Resistance is measured in ohms.
It is caused by the interaction between electrons and the atoms of a material.
Materials with high resistance are called insulators, while those with low resistance are called conductors.
Examples of conductors include metals like copper and aluminum, while examples of insulators include rubber and glass.
Q142. Write down C program for email id validation.
A C program to validate email IDs
Use regular expressions to check if the email ID follows the standard format
Check for the presence of '@' symbol and at least one '.' after it
Validate the characters before and after the '@' symbol
Consider the length restrictions for the email ID
Q143. 5.Write any program in c language
Program to print 'Hello, World!' in C language
Include stdio.h header file
Use printf() function to print the message
End the program with return 0 statement
Q144. Software Development Life cycle
Software Development Life Cycle (SDLC) is a process followed by software development teams to design, develop and test high-quality software.
SDLC consists of several phases including planning, analysis, design, development, testing, deployment, and maintenance.
Each phase has its own set of activities and deliverables that must be completed before moving on to the next phase.
SDLC models include Waterfall, Agile, and DevOps, each with its own strengths and weaknesses.
Effective ...read more
Q145. Why is OOP needed ?
OOP is needed for better organization, reusability, and maintainability of code.
Encapsulation: Bundling data and methods that operate on the data together.
Inheritance: Allowing classes to inherit attributes and methods from other classes.
Polymorphism: Using a single interface to represent different data types or objects.
Code reusability: Classes and objects can be reused in different parts of the program.
Modularity: Breaking down a complex problem into smaller, more manageabl...read more
Q146. Write a program to swap to Numbers
A program to swap two numbers
Declare two variables to store the numbers
Take input for both variables
Swap the values using a temporary variable
Print the swapped values
Q147. Difference between array and union?
Arrays are a collection of similar data types while unions are a collection of different data types sharing the same memory space.
Arrays are used to store a fixed number of elements of the same data type.
Unions are used to store different data types in the same memory location.
Arrays are accessed using an index while unions are accessed using the same memory location.
Arrays are used for homogeneous data while unions are used for heterogeneous data.
Q148. Find Second Highest number in an Array
Find the second highest number in an array of integers.
Sort the array in descending order and return the second element.
Iterate through the array and keep track of the highest and second highest numbers.
Use a priority queue to keep track of the highest and second highest numbers.
Q149. Sort the array in increasing order.
To sort an array in increasing order, we can use any sorting algorithm like bubble sort, insertion sort, or quicksort.
Choose a sorting algorithm based on the size of the array and the time complexity required.
Implement the chosen algorithm in the programming language of choice.
Test the sorting function with different input arrays to ensure correctness.
Q150. SQL query to fetch count of records
SQL query to fetch count of records
Use SELECT COUNT(*) FROM table_name
Replace table_name with the name of the table you want to count records from
Interview Questions of Similar Designations
Top Interview Questions for Programmer Analyst Trainee 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