Programmer Analyst Trainee

60+ Programmer Analyst Trainee Interview Questions and Answers for Freshers

Updated 6 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. 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

Q3. 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.

Q4. 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 
Are these interview questions helpful?

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 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.

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.

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.

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Q7. 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()

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.

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

Programmer Analyst Trainee Jobs

0

Q9. 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

Q10. 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

Q11. 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.

Q12. 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

Q13. 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.

Q14. 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

Q15. 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

Q16. 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

Q17. 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

Q18. 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

Q19. 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

Q20. 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

Q21. 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.

Q22. 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.

Q23. 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

Q24. 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

Q25. How to implement javascript in HTML code?

Ans.

JavaScript can be implemented in HTML using tags.

Q26. write a code to swap 2 numbers without using pointer, using function

Ans.

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?

Ans.

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?

Ans.

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?

Ans.

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.

Ans.

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

Ans.

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

Ans.

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

Ans.

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?

Ans.

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?

Ans.

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?

Ans.

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?

Ans.

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?

Ans.

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.

Frequently asked in, ,

Q39. What are lists? What are data structures?

Ans.

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

Ans.

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.

Ans.

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

Ans.

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.

Ans.

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

Ans.

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?

Ans.

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

Ans.

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.

Ans.

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

Ans.

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

Frequently asked in, ,

Q49. Why cloud computing is used

Ans.

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.

Ans.

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.

1
2
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