Programmer Analyst Trainee
200+ Programmer Analyst Trainee Interview Questions and Answers
Q51. explain hello world in details why public static is used why it it important
public static is used in Java to define a method that can be called without creating an instance of the class.
public static is used in Java to define a method that belongs to the class itself, rather than to any specific instance of the class.
public static methods can be called directly using the class name, without needing to create an object of the class.
In the 'Hello World' program, public static is used to define the main method, which is the entry point of the program.
Us...read more
Q52. 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
Q53. What will you do if the technology you are working obsoletes.
I will adapt and learn new technologies to stay relevant in the industry.
Research and analyze emerging technologies
Attend training and workshops to learn new skills
Collaborate with colleagues to share knowledge and expertise
Update resume and portfolio to showcase new skills
Stay proactive and open-minded towards change
Q54. What is oops in c# and explain each i details of it
Object-oriented programming in C# involves concepts like classes, objects, inheritance, encapsulation, and polymorphism.
Classes: Blueprint for creating objects, containing data members and methods.
Objects: Instances of classes, representing real-world entities.
Inheritance: Ability to create new classes based on existing ones, inheriting their attributes and behaviors.
Encapsulation: Bundling data and methods that operate on the data into a single unit.
Polymorphism: Ability to ...read more
Q55. what is form factor, difference between generator and alternator
Form factor is the ratio of RMS value to average value of a waveform. Generator converts mechanical energy to electrical energy while alternator converts electrical energy to mechanical energy.
Form factor is a measure of waveform distortion
Generator produces DC or AC power by converting mechanical energy
Alternator produces AC power by converting mechanical energy
Generator has a commutator while alternator has slip rings
Examples of generators are hydroelectric power plants and...read more
Q56. Do you know C Programming?
Yes, I know C Programming.
I have experience in writing programs in C language.
I am familiar with the syntax and structure of C language.
I have worked on projects using C language, such as developing a simple calculator program.
I am comfortable with concepts such as pointers, arrays, and structures in C language.
Share interview questions and help millions of jobseekers 🌟
Q57. Prime numbers coding question in any language?
A prime number is a number that is only divisible by 1 and itself.
Loop through numbers 2 to n-1 and check if n is divisible by any of them
Use the modulo operator to check for divisibility
Optimization: only check up to the square root of n
Q58. Program to print the prime numbers between 1 to n
Program to print prime numbers between 1 to n.
Iterate from 2 to n and check if each number is prime
A number is prime if it is only divisible by 1 and itself
Use a nested loop to check if the number is divisible by any number between 2 and itself-1
If not divisible, print the number as prime
Q59. 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.
Q60. Explain any two OOPs concept with real life example?
Encapsulation and Inheritance are two OOPs concepts with real-life examples.
Encapsulation: Wrapping data and methods into a single unit. Example: A car's engine is encapsulated as a single unit, and the driver only interacts with it through the dashboard controls.
Inheritance: Creating a new class from an existing class. Example: A sports car is a subclass of a car, inheriting all the properties and methods of a car but with additional features specific to sports cars.
Q61. Explain linked list,stack and queue concept
Linked list, stack, and queue are data structures used to store and manipulate data.
Linked list is a collection of nodes where each node points to the next node. Example: Singly linked list, Doubly linked list.
Stack is a LIFO (Last In First Out) data structure. Example: Undo/Redo functionality in text editors.
Queue is a FIFO (First In First Out) data structure. Example: Print queue in a printer.
Q62. Whats the difference between sql union and union all
SQL UNION combines and removes duplicates, UNION ALL combines without removing duplicates.
UNION merges the results of two or more SELECT statements into a single result set
UNION ALL includes all the rows from each SELECT statement, including duplicates
UNION removes duplicates from the result set, while UNION ALL does not
UNION requires the same number of columns in all SELECT statements, while UNION ALL does not have this requirement
Q63. 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
Q64. What is dynamic memory allacation and its types ?
Dynamic memory allocation is the process of allocating memory during runtime.
It allows programs to allocate memory as needed, rather than at compile time.
Types include malloc(), calloc(), realloc(), and free().
malloc() allocates a block of memory of specified size.
calloc() allocates a block of memory for an array of elements, initializing them to zero.
realloc() changes the size of a previously allocated block of memory.
free() deallocates the memory previously allocated by mal...read more
Q65. What is CSS and How we can add with HTML?
CSS is a styling language used to control the look and feel of a website. It can be added to HTML using the <style> tag or external CSS files.
CSS stands for Cascading Style Sheets
It is used to define the layout, colors, fonts, and other visual aspects of a website
CSS can be added to HTML using the <style> tag within the <head> section or by linking an external CSS file using the <link> tag
Inline CSS can also be added directly to HTML elements using the style attribute
Example:...read more
Q66. Explain the Oops concepts in detail with real-world examples.
Object-oriented programming concepts with real-world examples.
Encapsulation: Hiding implementation details of a class. Example: A car's engine is encapsulated.
Inheritance: A class inheriting properties and methods from another class. Example: A dog is an animal.
Polymorphism: Ability of an object to take many forms. Example: A shape can be a circle, square, or triangle.
Abstraction: Focusing on essential features of an object. Example: A TV remote has buttons for essential func...read more
Q67. What is shortest path algorithm
Shortest path algorithm is used to find the shortest path between two points in a graph.
It is commonly used in GPS navigation systems.
Dijkstra's algorithm and Bellman-Ford algorithm are two popular shortest path algorithms.
The algorithm works by exploring all possible paths and selecting the one with the lowest cost.
The cost can be distance, time, or any other metric depending on the problem.
Shortest path algorithms are used in various fields such as transportation, network r...read more
Q68. What is primary key and foriegn key
Primary key uniquely identifies a record in a table, while foreign key refers to a field in another table.
Primary key is used to enforce data integrity and ensure uniqueness of records
Foreign key is used to establish a relationship between two tables
Example: CustomerID in Orders table is a foreign key that references the Customer table's primary key
Foreign key constraints ensure referential integrity
Q69. What is the difference between c and c++?
C++ is an extension of C with object-oriented programming features.
C++ supports object-oriented programming while C does not.
C++ has classes and templates while C does not.
C++ has better support for exception handling than C.
C++ has a standard library that includes many useful functions.
C++ is more complex than C and can be harder to learn.
Q70. What is example of python IDE ?
PyCharm is a popular Python IDE.
PyCharm is a powerful and feature-rich IDE for Python development.
It provides intelligent code completion, debugging tools, and version control integration.
Other examples of Python IDEs include Visual Studio Code, Spyder, and Jupyter Notebook.
Q71. 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.
Q72. Coding question - Write the code to print all the even number indexes from an array.
Print all even number indexes from an array of strings.
Iterate through the array and check if the index is even using modulo operator.
Print the element at even indexes.
Q73. What is inheritance and why we use it?
Inheritance is a mechanism in object-oriented programming where a new class is created by inheriting properties of an existing class.
Inheritance allows code reusability and saves time and effort in writing new code.
The existing class is called the parent or base class, and the new class is called the child or derived class.
The child class inherits all the properties and methods of the parent class and can also add new properties and methods.
For example, a class 'Vehicle' can ...read more
Q74. Why we use object oriented programming?
Object oriented programming allows for modular, reusable, and maintainable code.
Encapsulation allows for data hiding and protects code from external interference.
Inheritance allows for code reuse and promotes consistency.
Polymorphism allows for flexibility and extensibility.
Objects can be easily tested and debugged.
Object oriented programming promotes code organization and readability.
Examples include Java, Python, and C++.
Q75. write a basic query to fetch data from a table ?
Basic query to fetch data from a table in SQL
Use SELECT statement to fetch data
Specify the columns you want to retrieve after SELECT
Specify the table name after FROM
Q76. Why we are doing normalization ?
Normalization is done to eliminate data redundancy and improve data integrity.
To avoid data duplication
To reduce storage space
To improve data consistency
To prevent update anomalies
To simplify queries
To follow database design principles
To ensure data accuracy and reliability
Q77. 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.
Q78. 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
Q79. Write a Query to find the prime number upto n using python
Query to find prime numbers up to n using Python
Use a for loop to iterate through numbers up to n
Check if each number is prime by dividing it by numbers up to its square root
If the number is only divisible by 1 and itself, it is prime
Q80. 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 }
Q81. What is method Overloading and method overriding
Method overloading is when multiple methods have the same name but different parameters. Method overriding is when a subclass provides a specific implementation of a method that is already provided by its superclass.
Method overloading allows a class to have multiple methods with the same name but different parameters.
Method overriding occurs in a subclass when a method has the same name, return type, and parameters as a method in its superclass.
Example of method overloading: ...read more
Q82. What is html in google chrome coding panel?
HTML in Google Chrome coding panel is the code representation of the webpage being viewed.
HTML code in Google Chrome coding panel shows the structure and content of the webpage.
Developers can use the coding panel to inspect and modify the HTML code of the webpage.
Changes made in the coding panel reflect in real-time on the webpage being viewed.
Q83. Osi layer and different protocols working on different layers
The OSI model is a conceptual framework that standardizes the functions of a telecommunication or computing system into seven different layers.
The OSI model consists of seven layers: Physical, Data Link, Network, Transport, Session, Presentation, and Application.
Each layer has its own specific functions and protocols that operate at that layer.
Examples of protocols at different layers include Ethernet at the Data Link layer, IP at the Network layer, TCP at the Transport layer...read more
Q84. Can you write the code for bubble sort ?
Bubble sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.
Start by comparing the first two elements of the array and swap them if necessary
Continue comparing adjacent elements and swapping them until the entire array is sorted
Repeat this process for each element in the array until no more swaps are needed
Q85. how do you make 8 slices of pizza in 3 cut.
To make 8 slices of pizza in 3 cuts, you can stack the pizzas on top of each other and cut through all of them at once.
Stack 4 pizzas on top of each other and make 2 cuts horizontally to get 8 slices.
Alternatively, stack 2 pizzas on top of each other, make 1 horizontal cut, then separate the stacks and make 2 vertical cuts to get 8 slices.
Q86. What are the types of index
Indexes are used to improve database performance. There are mainly two types of indexes: clustered and non-clustered.
Clustered index determines the physical order of data in a table. A table can have only one clustered index.
Non-clustered index is a separate structure from the data table that stores the indexed columns and a pointer to the data row.
Other types of indexes include unique, full-text, filtered, and XML indexes.
Indexes can be created on one or more columns of a ta...read more
Q87. What is dbms and what are joins please explain.
DBMS stands for Database Management System. Joins are used to combine rows from two or more tables based on a related column between them.
DBMS is a software system that allows users to define, create, maintain and control access to databases.
Joins in DBMS are used to retrieve data from multiple tables based on a related column between them.
Common types of joins include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN.
Example: SELECT * FROM table1 INNER JOIN table2 ON table1.c...read more
Q88. What is difference between tupple and list?
Tuples are immutable and ordered collections, while lists are mutable and ordered collections in Python.
Tuples are created using parentheses () while lists are created using square brackets []
Tuples are immutable, meaning their elements cannot be changed once assigned, while lists are mutable and can be modified
Tuples are faster than lists for accessing elements, but lists are more flexible for operations like adding or removing elements
Example: tuple = (1, 2, 3) and list = [...read more
Q89. Tell me something about image processing
Image processing involves manipulating digital images to improve their quality or extract useful information.
Image enhancement: improving the quality of an image by adjusting brightness, contrast, etc.
Image restoration: removing noise or other imperfections from an image.
Image segmentation: dividing an image into multiple segments for analysis.
Object detection: identifying and locating objects within an image.
Pattern recognition: identifying patterns or objects based on prede...read more
Q90. what technology you want to work with
I am interested in working with web development technologies such as JavaScript, React, and Node.js.
JavaScript
React
Node.js
Q91. How wifi works how Bluetooth works
WiFi and Bluetooth are wireless communication technologies that allow devices to connect and exchange data.
WiFi uses radio waves to transmit data over a network, typically using a router or access point.
Bluetooth uses short-range radio waves to connect devices directly to each other.
WiFi operates on a larger scale, covering larger areas and allowing multiple devices to connect simultaneously.
Bluetooth operates on a smaller scale, typically connecting two devices in close prox...read more
Q92. What do you know about Big data tech
Big data tech refers to technologies and tools used to process and analyze large volumes of data to extract valuable insights.
Big data tech includes tools like Hadoop, Spark, and Kafka for processing and storing large datasets.
It involves technologies like data mining, machine learning, and predictive analytics to extract insights from data.
Big data tech is used in various industries like finance, healthcare, and e-commerce to make data-driven decisions.
Examples of big data a...read more
Q93. Can you explain the 4 pillars of oops
The 4 pillars of OOP are Abstraction, Encapsulation, Inheritance, and Polymorphism.
Abstraction: Hiding implementation details and showing only necessary information.
Encapsulation: Binding data and functions together to protect data from outside interference.
Inheritance: Creating new classes from existing ones, inheriting properties and methods.
Polymorphism: Using a single interface to represent different types of objects.
Q94. What is the rating of a transformer ?
The rating of a transformer refers to its power capacity and is typically expressed in volt-amperes (VA) or kilovolt-amperes (kVA).
The rating of a transformer determines the maximum amount of power it can handle.
It is important to select a transformer with a rating that matches the power requirements of the load.
Transformer ratings can vary widely depending on the application, from small transformers used in electronic devices to large power transformers used in electrical gr...read more
Q95. Explain the concept of Oops and what is a database
OOPS is a programming paradigm that focuses on objects and their interactions. A database is a structured collection of data.
OOPS stands for Object-Oriented Programming System
It emphasizes the use of objects, classes, and inheritance
Encapsulation, polymorphism, and abstraction are key principles of OOPS
A database is a system for storing and managing structured data
It allows for efficient data retrieval, manipulation, and organization
Relational databases, like MySQL, use table...read more
Q96. 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
Q97. 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.
Q98. 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
Q99. What is front end ,sql ,c language, css,html, db
Front end refers to the user interface of a website or application, SQL is a language used for managing databases, C is a programming language, CSS and HTML are used for styling web pages, and DB likely refers to a database.
Front end is the visual part of a website or application that users interact with
SQL is a language used for managing and querying databases
C is a programming language commonly used for system programming
CSS is used for styling the layout and design of web ...read more
Q100. tell me about if and function...
If statements are used to make decisions in programming based on a condition. Functions are blocks of code that can be called and executed.
If statements are used to execute a block of code only if a specified condition is true.
Functions are reusable blocks of code that can be called multiple times.
Example: if (x > 5) { // do something }
Example: function addNumbers(a, b) { return a + b; }
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