Programmer Analyst Trainee

200+ Programmer Analyst Trainee Interview Questions and Answers

Updated 29 Nov 2024

Popular Companies

search-icon

Q1. Check for syntax error/logical error and correct the error to get the desired output. void maxReplace(int size,int *inputList) { int i,sum=0; for(i=0;i

Ans.

Fix syntax and logical errors in maxReplace function

  • Change 'o' to '0' in second for loop

  • Replace sum with inputList[i] in second for loop

  • Add a condition to check if inputList[i] is greater than sum in second for loop

  • Print sum instead of inputList[i] in third for loop

Q2. Alien dictionary

You have been given a sorted (lexical order) dictionary of an alien language. Write a function that finds the order of characters in the alien language. This dictionary will be given to you in t...read more

Programmer Analyst Trainee Interview Questions and Answers for Freshers

illustration image

Q3. if you promised a customer for the product on a specific day and your company will not be able to give that product on time then how will you convince that customer ?

Ans.

I would apologize for the delay and offer a solution or compensation.

  • Acknowledge the inconvenience caused to the customer

  • Explain the reason for the delay and assure them that steps are being taken to resolve it

  • Offer a solution or compensation to make up for the delay

  • Maintain open communication with the customer throughout the process

Q4. What are OOP characteristics? Difference between abstraction and encapsulation? What are types of polymorphism ?4 to 5 Question on projects which I have mentioned in cv. Write a program to find the prime factor...

read more
Ans.

Answering questions related to OOP characteristics, polymorphism, and programming projects.

  • OOP characteristics include inheritance, encapsulation, abstraction, and polymorphism.

  • Abstraction is the process of hiding implementation details while encapsulation is the process of hiding data.

  • Types of polymorphism include compile-time and runtime polymorphism.

  • Projects mentioned in CV were discussed and explained.

  • A program to find prime factors of a number can be written using a loop...read more

Are these interview questions helpful?

Q5. Why is java platform independent?

Ans.

Java is platform independent due to its bytecode and JVM.

  • Java code is compiled into bytecode which is platform-independent.

  • JVM (Java Virtual Machine) interprets the bytecode and executes it on any platform.

  • This eliminates the need for recompilation of code for different platforms.

  • For example, a Java program compiled on Windows can run on Linux or Mac without any changes.

  • This makes Java highly portable and flexible.

Q6. Star Pattern

Pattern for N = 4


The dots represent spaces.



Input Format :
N (Total no. of rows) 
Output Format :
Pattern in N lines 
Constraints :
0 <= N <= 50 

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Q7. Which programming language are you familiar with? what are the datasets in python what is the difference between list and tuple in python? write a program to find number of white spaces in a given string? what ...

read more
Ans.

Answering questions related to programming language Python.

  • I am familiar with Python programming language.

  • Datasets in Python include NumPy, Pandas, and SciPy.

  • List is mutable while Tuple is immutable in Python.

  • Program to find number of white spaces in a given string: def count_spaces(string): return string.count(' ')

  • While loop executes a block of code as long as the condition is true, for loop executes a block of code for a specific number of times.

Q8. If you have given a 1 kg cake and you have given 3 chance to cut and you have to distribute among 8 people how will you do that? condition is that you have to distribute it equally among 8 people.

Ans.

Divide 1 kg cake equally among 8 people in 3 cuts.

  • Cut the cake into 8 equal pieces using 2 cuts.

  • Stack the pieces and cut them in half using the third cut.

  • Distribute the 16 pieces among 8 people.

Programmer Analyst Trainee Jobs

0

Q9. What is the difference between Method and Function in programming language?

Ans.

Method and Function are both blocks of code that perform a specific task, but the main difference is that a method is associated with an object while a function is not.

  • A method is called on an object, while a function is called independently.

  • A method can modify the state of an object, while a function cannot.

  • A method is defined within a class, while a function is defined outside of a class.

  • Example of a method: object.methodName()

  • Example of a function: functionName()

Q10. Write a program to check whether a string starts with 's' and if it starts with it convert it into an array named anything and print that array one by one.

Ans.

Program to check if a string starts with 's' and convert it to an array

  • Use string method startsWith() to check if the string starts with 's'

  • If it starts with 's', use split() method to convert it into an array

  • Loop through the array and print each element

Q11. Write a program to check whether a given integer is a prime or not and even or odd and it should not give any errors for any kind of inputs.

Ans.

Program to check if an integer is prime, even or odd without errors.

  • Take input integer from user

  • Check if input is valid integer

  • Check if input is prime or not

  • Check if input is even or odd

  • Display the result

Q12. Write a c program which will display your name in first line and from second line one word will be lesser from the previous line. Display this until one word remains

Ans.

The program will display the name of the user in the first line and then decrease one word in each subsequent line until only one word remains.

  • Create an array of strings containing the user's name split into individual words

  • Use a loop to iterate through the array and print the name with one less word in each iteration

  • Continue the loop until only one word remains

Q13. An sql query to find salary, department of employee

Ans.

An SQL query to find the salary and department of an employee.

  • Use the SELECT statement to retrieve the desired columns.

  • Specify the table name and join it with the department table using the appropriate join condition.

  • Use the WHERE clause to filter the results based on employee criteria if needed.

Q14. Which programming language you like the most and why?

Ans.

I like Python the most because of its simplicity and versatility.

  • Python has a simple syntax which makes it easy to learn and use.

  • It has a vast library of modules and frameworks for various purposes.

  • Python is used in various fields such as web development, data science, and automation.

  • It supports both object-oriented and functional programming paradigms.

  • Python is also known for its readability and maintainability of code.

  • For example, I have used Python for web scraping, data a...read more

Q15. what is the output for the given code sample explain

Ans.

The output of the code sample is 'Hello World'.

  • The code sample is likely to print a string.

  • The string being printed is 'Hello World'.

Q16. What error will you get if you enter a duplicate value to the primary key column

Ans.

You will get a primary key violation error if you enter a duplicate value to the primary key column.

  • A primary key is a unique identifier for each record in a database table.

  • When you try to insert a duplicate value into the primary key column, the database system will throw an error.

  • The error message will typically indicate a primary key violation or duplicate key error.

  • To resolve the issue, you need to ensure that each value in the primary key column is unique.

Q17. Explain how the Software Development process works ? And what is it that we are following now a days ?

Ans.

Software development process involves planning, designing, coding, testing, and deployment of software.

  • Requirement gathering and analysis

  • Designing the software architecture

  • Coding and implementation

  • Testing and debugging

  • Deployment and maintenance

  • Agile methodology is commonly followed nowadays

Q18. Find third lowest element from an array and count the occurrence of that number in the array.

Ans.

Find third lowest element and its occurrence in an array.

  • Sort the array and return the element at index 2 with its count.

  • Use a hash table to count occurrences while iterating through the array.

Q19. What is R programming? What is Public class? What are access specifiers? Write a array program and explain it for nested loop concept?

Ans.

R programming is a language and environment for statistical computing and graphics.

  • R programming is widely used for data analysis, statistical modeling, and visualization.

  • Public class in programming refers to a class that can be accessed from outside the package.

  • Access specifiers in programming define the accessibility of classes, methods, and variables.

  • An array program using nested loops can be used to iterate through a multi-dimensional array.

Q20. Aptitude Question

There was a star and at each vertex, there was a number on each vertice the number was not given so we have to find the missing number.

Q21. Under 'If' statement if more than 1 statements are there and curly brackets is not there then what will be the output?

Ans.

If more than 1 statements are under 'If' statement without curly brackets, what will be the output?

  • The first statement after 'if' will be executed

  • The second statement will be executed regardless of the condition

  • It can lead to unexpected behavior and bugs

  • Always use curly brackets to avoid confusion

Q22. What are star and mesh topology?

Ans.

Star and mesh are network topologies used in computer networking.

  • Star topology connects all devices to a central hub or switch.

  • Mesh topology connects every device to every other device.

  • Star topology is easy to set up and troubleshoot.

  • Mesh topology is highly reliable and fault-tolerant.

  • Examples of star topology include Ethernet and Wi-Fi networks.

  • Examples of mesh topology include sensor networks and peer-to-peer networks.

Q23. What is machine learning, deep learning, artificial intelligence and cloud computing?

Ans.

Machine learning, deep learning, artificial intelligence and cloud computing are all related to advanced computing technologies.

  • Machine learning is a subset of AI that involves training algorithms to make predictions or decisions based on data.

  • Deep learning is a subset of machine learning that uses neural networks to learn and make decisions.

  • Artificial intelligence is the broader field of creating intelligent machines that can perform tasks that typically require human intell...read more

Q24. As i am from ECE, difference between half duplex and full duplex

Ans.

Half duplex allows communication in both directions, but not simultaneously. Full duplex allows simultaneous communication in both directions.

  • Half duplex allows communication in both directions, but only one direction at a time.

  • Full duplex allows simultaneous communication in both directions.

  • Examples of half duplex communication include walkie-talkies and CB radios.

  • Examples of full duplex communication include telephone conversations and video conferencing.

Q25. What is the advantage of using netbeans for writing java ?

Ans.

NetBeans provides a user-friendly interface, powerful code editing features, and seamless integration with Java development tools.

  • NetBeans offers a user-friendly interface with drag-and-drop functionality for easy development.

  • It provides powerful code editing features like code completion, refactoring, and debugging.

  • NetBeans has seamless integration with Java development tools, making it easier to build, test, and deploy Java applications.

  • It supports various frameworks and te...read more

Q26. What is difference between RDBMS and DBMS? What is differenence between stack and queue?

Ans.

RDBMS is a relational database management system that stores data in tables with predefined relationships. DBMS is a general-purpose database management system that stores data in various formats.

  • RDBMS enforces ACID properties while DBMS does not

  • RDBMS supports SQL while DBMS may or may not support SQL

  • RDBMS is used for large-scale applications while DBMS is used for small-scale applications

  • Stack is a LIFO data structure while Queue is a FIFO data structure

  • Stack uses push and p...read more

Q27. Tell about encoder, decoder and Multiplexer

Ans.

Encoders, decoders, and multiplexers are digital logic circuits used in data processing and communication systems.

  • An encoder is a circuit that converts a set of input signals into a coded output signal.

  • A decoder is a circuit that converts a coded input signal into a set of output signals.

  • A multiplexer is a circuit that selects one of many input signals and forwards it to a single output line.

  • Encoders and decoders are often used together to convert data between different forma...read more

Q28. Tell me some of the features of Java?

Ans.

Java is a popular programming language known for its platform independence and object-oriented features.

  • Java is platform independent, meaning it can run on any platform with a Java Virtual Machine (JVM)

  • Java is object-oriented, allowing for encapsulation, inheritance, and polymorphism

  • Java has automatic memory management through garbage collection

  • Java has a rich set of APIs and libraries for various tasks, such as networking and GUI development

  • Java supports multithreading, allo...read more

Q29. Query to select the row of any table

Ans.

Query to select a row from any table

  • Use SELECT statement with WHERE clause to specify the row to be selected

  • Specify the table name and column names in the SELECT statement

  • Use appropriate conditions in the WHERE clause to filter the rows

  • Example: SELECT * FROM table_name WHERE column_name = value;

Q30. Write the any coding in c language?

Ans.

Here is a simple example of a C program that prints 'Hello, World!'

  • Declare a main function

  • Use the printf function to print 'Hello, World!'

  • Return 0 to indicate successful execution

Q31. What is an object?can you explain with an example?

Ans.

An object is an instance of a class that encapsulates data and behavior.

  • Objects have attributes (data) and methods (behavior).

  • Objects can interact with each other through method calls.

  • Example: A car object has attributes like color, make, and model, and methods like start and stop.

  • Objects promote code reusability and modularity.

Q32. What is a latch-up in communications?

Ans.

Latch-up is a phenomenon in which a circuit becomes stuck in a high-current state.

  • It occurs when a parasitic thyristor is inadvertently created within a circuit

  • It can cause permanent damage to the circuit

  • It can be prevented by using proper design techniques and layout

  • Example: A latch-up can occur in a microcontroller when a voltage spike causes the input to exceed the maximum rating

Q33. What is encapsulation

Ans.

Encapsulation is the process of hiding implementation details and providing a public interface for accessing the functionality.

  • Encapsulation helps in achieving data abstraction and information hiding

  • It prevents unauthorized access to the internal details of an object

  • It allows for better control over the data and its behavior

  • Example: A bank account class may have private variables for account number and balance, but provide public methods for deposit and withdrawal

  • Example: A c...read more

Frequently asked in, ,

Q34. what are oops and explain them with real time example?

Ans.

OOPs stands for Object-Oriented Programming. It is a programming paradigm based on the concept of objects.

  • OOPs is based on the concept of classes and objects.

  • It focuses on encapsulation, inheritance, and polymorphism.

  • Real-time examples of OOPs include a car, a bank account, and a smartphone.

  • In a car, the engine, wheels, and other components are objects, and the car itself is a class.

  • In a bank account, the account holder's name, account number, and balance are objects, and the...read more

Q35. what is a circular linked list?

Ans.

A circular linked list is a linked list where the last node points to the first node, forming a loop.

  • Each node has a pointer to the next node and the last node points to the first node

  • Traversal can start from any node and continue until the starting node is reached again

  • Used in applications where data needs to be accessed in a circular manner, such as a playlist

Q36. What is the difference between primary and secondary winding

Ans.

Primary winding is the input coil while secondary winding is the output coil in a transformer.

  • Primary winding is connected to the input voltage source

  • Secondary winding is connected to the load

  • Primary winding has fewer turns than secondary winding

  • Secondary winding has higher voltage than primary winding

Q37. What is the main features of object oriented programming?

Ans.

Object oriented programming features include encapsulation, inheritance, and polymorphism.

  • Encapsulation: bundling of data and methods that operate on that data within a single unit

  • Inheritance: ability of a class to inherit properties and methods from a parent class

  • Polymorphism: ability of objects to take on multiple forms or behaviors depending on the context

  • Example: Java, C++, Python

Q38. Give some examples where mechanical engineering and IT can work together.

Ans.

Mechanical engineering and IT can work together in various fields.

  • Designing and simulating mechanical systems using computer-aided design (CAD) software

  • Developing and implementing control systems for mechanical devices using programming languages

  • Using sensors and data analysis to optimize mechanical systems

  • Creating virtual reality simulations for training and testing mechanical systems

  • Developing software for 3D printing and additive manufacturing

  • Integrating IT systems with ma...read more

Q39. Difference between Java and c++?

Ans.

Java is a high-level, object-oriented programming language, while C++ is a low-level, general-purpose programming language.

  • Java is platform-independent, while C++ is platform-dependent.

  • Java has automatic memory management (garbage collection), while C++ requires manual memory management.

  • Java supports multithreading and exception handling by default, while C++ requires explicit implementation.

  • Java has a simpler syntax and is easier to learn, while C++ offers more control and p...read more

Q40. Give the logic of push and pop in stacks?

Ans.

Push adds an element to the top of the stack and pop removes the top element from the stack.

  • Push increases the stack size by 1 and places the new element at the top.

  • Pop removes the top element and decreases the stack size by 1.

  • Stack follows LIFO (Last In First Out) principle.

Q41. What is Repeater in Communications?

Ans.

A repeater is a device that receives a signal and retransmits it at a higher power or to an extended range.

  • Repeater is used to extend the range of a signal in communication.

  • It receives a signal and amplifies it before retransmitting it.

  • It can be used in radio, television, and telephone communication.

  • Example: Wi-Fi range extenders act as repeaters to boost the signal strength and extend the coverage area.

Q42. What are oops and explain all briefly?

Ans.

Object-oriented programming concepts including encapsulation, inheritance, polymorphism, and abstraction.

  • Encapsulation: bundling data and methods that operate on the data into a single unit (class)

  • Inheritance: ability of a class to inherit properties and behavior from another class

  • Polymorphism: ability to present the same interface for different data types

  • Abstraction: hiding the complex implementation details and showing only the necessary features

Q43. What is HTML and how it difference from programming language?

Ans.

HTML is a markup language used to create web pages. It is not a programming language.

  • HTML stands for Hypertext Markup Language.

  • It is used to structure content on the web.

  • HTML uses tags to define elements such as headings, paragraphs, and links.

  • Programming languages like Java and Python are used to create software applications.

  • HTML is not capable of performing complex computations or creating dynamic content like programming languages.

  • HTML is often used in conjunction with pro...read more

Q44. Do you want to work in Testing though seems like you have a good coding background?

Ans.

Yes, I am open to working in Testing despite having a strong coding background.

  • I believe that having experience in testing will make me a more well-rounded programmer.

  • Working in testing will help me understand the software development process from a different perspective.

  • I am open to learning new skills and gaining experience in different areas of software development.

Q45. What is normalisation in SQL, write a SQL query to select contents from a table.

Ans.

Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity.

  • Normalization involves breaking down a table into smaller tables and defining relationships between them.

  • There are different levels of normalization, with each level having specific rules to follow.

  • A SQL query to select contents from a table would be: SELECT * FROM table_name;

  • Normalization helps to prevent data inconsistencies and anomalies.

  • Normalization can improve d...read more

Q46. what do you mean by tcp/ip?

Ans.

TCP/IP stands for Transmission Control Protocol/Internet Protocol. It is a set of protocols that allows computers to communicate over the internet.

  • TCP/IP is a suite of communication protocols used for transmitting data over networks.

  • It provides reliable, connection-oriented communication between devices.

  • TCP is responsible for breaking data into packets, ensuring they are delivered in order and error-free.

  • IP handles the addressing and routing of packets across the internet.

  • Exa...read more

Q47. What is bst? What is different typr of binary tree?

Ans.

BST stands for Binary Search Tree. It is a type of binary tree used for searching and sorting operations.

  • BST is a binary tree where each node has at most two children.

  • In a BST, the left subtree of a node contains only nodes with keys lesser than the node's key, and the right subtree contains only nodes with keys greater than the node's key.

  • Some examples of BST are AVL tree, Red-Black tree, and Splay tree.

Q48. Write the code block to print 4 stars , 3stars, 2stars, 1 star line by line ?

Ans.

Code block to print decreasing number of stars line by line

  • Use a loop to iterate from 4 to 1

  • Inside the loop, print the number of stars based on the current iteration

  • Use string concatenation to print the stars on the same line

Q49. What is artificial intelligence?

Ans.

Artificial intelligence is the simulation of human intelligence processes by machines, especially computer systems.

  • AI involves machines learning from data, recognizing patterns, and making decisions.

  • Examples include virtual assistants like Siri, self-driving cars, and recommendation systems like Netflix.

  • AI can be categorized into narrow AI (specific tasks) and general AI (human-like intelligence).

Frequently asked in, ,

Q50. How to implement javascript in HTML code?

Ans.

JavaScript can be implemented in HTML using tags.

1
2
3
4
5
Next
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

3.7
 • 10k Interviews
3.7
 • 7.3k Interviews
3.8
 • 5.4k Interviews
3.7
 • 5.2k Interviews
4.1
 • 4.9k Interviews
3.6
 • 3.6k Interviews
3.9
 • 540 Interviews
View all

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

Programmer Analyst Trainee Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter