Programmer Analyst Trainee
60+ Programmer Analyst Trainee Interview Questions and Answers for Freshers
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
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. 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 ?
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
Q3. Why is java platform independent?
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.
Print the following 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
Q5. 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 moreAnswering 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.
Q6. 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.
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.
Share interview questions and help millions of jobseekers 🌟
Q7. What is the difference between Method and Function in programming language?
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()
Q8. 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.
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
Programmer Analyst Trainee Jobs
0Q9. 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.
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
Q10. Which programming language you like the most and why?
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
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.
Q12. Under 'If' statement if more than 1 statements are there and curly brackets is not there then what will be the output?
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
Q13. What are star and mesh topology?
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.
Q14. Tell me some of the features of Java?
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
Q15. Write the any coding in c language?
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
Q16. What is a latch-up in communications?
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
Q17. what are oops and explain them with real time example?
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
Q18. what is a circular linked list?
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
Q19. Give some examples where mechanical engineering and IT can work together.
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
Q20. Difference between Java and c++?
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
Q21. Give the logic of push and pop in stacks?
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.
Q22. What is Repeater in Communications?
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.
Q23. What is HTML and how it difference from programming language?
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
Q24. what do you mean by tcp/ip?
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
Q25. How to implement javascript in HTML code?
JavaScript can be implemented in HTML using tags.
Q26. write a code to swap 2 numbers without using pointer, using function
Code to swap 2 numbers without using pointer, using function
Create a function that takes two integer parameters
Inside the function, swap the values of the parameters using a temporary variable
Return the swapped values
Call the function and pass the two numbers to be swapped as arguments
Q27. What is inheritance in Java?
Inheritance is a mechanism in Java where a class acquires the properties and methods of another class.
It allows for code reusability and promotes a hierarchical structure of classes.
The subclass inherits all the non-private members (fields, methods) of the superclass.
The keyword 'extends' is used to create a subclass.
Example: class Dog extends Animal { ... }
Multiple inheritance is not allowed in Java.
Q28. What is an Integrated Circuit?
An Integrated Circuit is a miniaturized electronic circuit consisting of interconnected semiconductor devices.
ICs are used in almost all electronic devices
They can be analog, digital or mixed-signal
ICs can be classified as SSI, MSI, LSI or VLSI based on the number of transistors they contain
Examples of ICs include microprocessors, memory chips, and amplifiers
Q29. What is CSS and How we can add with HTML?
CSS is a styling language used to add design and layout to HTML web pages.
CSS stands for Cascading Style Sheets.
It is used to separate the presentation of a web page from its content.
CSS can be added to HTML using the tag or the
Q30. Write a program to check for palindrome.
A program to check if a given string is a palindrome or not.
Remove all spaces and convert the string to lowercase for accurate results.
Compare the first and last characters of the string, then move towards the center.
If all characters match, the string is a palindrome.
If any character doesn't match, the string is not a palindrome.
Q31. What are cypher technique and explain cypher
Cypher is a cryptographic technique used to encrypt and decrypt data.
Cypher is a method of encoding information to keep it secure from unauthorized access.
It involves using algorithms to transform plaintext into ciphertext, and vice versa.
Examples of cypher techniques include AES, DES, and RSA.
Q32. What is object oriented programming language
Object oriented programming language is a type of programming language that uses objects and classes to organize code.
Uses objects and classes to model real-world entities
Encapsulates data and behavior within objects
Supports inheritance, polymorphism, and encapsulation
Examples include Java, C++, Python
Q33. Projects done, write a code whether a number is odd or even
Code to check if a number is odd or even
Use the modulo operator (%) to check if the remainder is 0 or 1
If remainder is 0, number is even. If remainder is 1, number is odd
Example: int num = 5; if(num % 2 == 0) { //even number } else { //odd number }
Q34. What are iterations?
Iterations are repetitive processes in programming that allow for the execution of a block of code multiple times.
Iterations are used to perform a task repeatedly until a certain condition is met.
They are commonly used in loops such as for, while, and do-while loops.
Iterations can also be used to iterate over data structures such as arrays and lists.
Examples of iterations include printing numbers from 1 to 10, summing the elements of an array, and searching for a specific val...read more
Q35. what do you know about cts?
CTS is a multinational IT services company headquartered in India.
CTS stands for Cognizant Technology Solutions.
It provides services in areas like digital, technology, consulting, and operations.
It has a global presence with offices in over 40 countries.
CTS is one of the largest IT services companies in the world.
It has been ranked among the top companies for employee satisfaction and diversity.
Q36. what is a database?
A database is a structured collection of data that is organized and stored for easy access, retrieval, and management.
A database is used to store and manage large amounts of data.
It provides a way to organize and structure data for efficient storage and retrieval.
Databases can be relational, object-oriented, or hierarchical, depending on the data model used.
They support operations like inserting, updating, deleting, and querying data.
Examples of databases include MySQL, Oracl...read more
Q37. 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
Q38. 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.
Q39. 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.
Q40. 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.
Q41. 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
Q42. 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
Q43. 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'); }
Q44. 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
Q45. 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.
Q46. 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
Q47. 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.
Q48. What is cloud computing
Cloud computing is the delivery of computing services over the internet, including storage, databases, networking, software, and more.
Cloud computing allows users to access resources on-demand without the need for physical infrastructure.
Examples of cloud computing services include Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform.
It offers scalability, flexibility, and cost-effectiveness for businesses and individuals.
Data is stored and processed on remot...read more
Q49. Why cloud computing is used
Cloud computing is used for scalability, cost-effectiveness, flexibility, and accessibility of resources.
Scalability: Easily scale resources up or down based on demand.
Cost-effectiveness: Pay only for the resources you use, reducing upfront costs.
Flexibility: Access resources from anywhere with an internet connection.
Accessibility: Allows for collaboration and sharing of resources across different locations.
Examples: Amazon Web Services (AWS), Microsoft Azure, Google Cloud Pl...read more
Q50. Find 2nd largest number in the array.
To find the 2nd largest number in an array, we can sort the array in descending order and return the second element.
Sort the array in descending order using any sorting algorithm.
Return the second element of the sorted array as it will be the 2nd largest number.
If the array has less than 2 elements, return an error message.
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