Programmer Analyst
70+ Programmer Analyst Interview Questions and Answers for Freshers
Q1. What is stack? How do you convert a queue to stack?
Stack is a data structure that follows LIFO (Last In First Out) principle. Converting a queue to stack requires dequeuing and pushing elements.
Stack is a collection of elements with two main operations: push and pop.
Push adds an element to the top of the stack, while pop removes the top element.
Converting a queue to stack requires dequeuing all elements and pushing them onto a stack.
Example: Queue: 1-2-3-4-5, Stack: 5-4-3-2-1
Q2. What is SQL? define ddl? Why should we hire you?
SQL is a programming language used to manage and manipulate relational databases.
SQL stands for Structured Query Language.
It is used to create, modify, and query databases.
DDL (Data Definition Language) is a subset of SQL used to define the structure of a database.
DDL commands include CREATE, ALTER, and DROP.
I should be hired because of my experience and skills in SQL programming and database management.
Q3. What is the difference between structure and class?
Structures are value types while classes are reference types.
Structures are allocated on stack while classes are allocated on heap.
Structures do not support inheritance while classes do.
Structures cannot have explicit parameterless constructors while classes can.
Structures are used for small data structures while classes are used for larger, more complex objects.
Example of structure: struct Point { int x, y; }
Example of class: class Person { string name; int age; }
Q4. Two defined table and fetching data is done one table has 20 records of 20 students another table has 10 student information if i want to pick the common record how to pick?
Use SQL JOIN to fetch common records from two tables.
Use SQL JOIN to combine the two tables based on a common column (e.g. student ID).
Select the columns you want to retrieve from both tables.
Use the WHERE clause to filter out the records that are common between the two tables.
Q5. What is the difference between RDBMS and DBMS? Explain database with a real life example of database.
RDBMS is a type of DBMS that uses a relational model to store and manage data.
DBMS is a general term for any software that manages data
RDBMS uses tables with rows and columns to store data
RDBMS enforces relationships between tables using keys
Example: MySQL, Oracle, SQL Server
Example of a database: a customer database for a retail store
Q6. If i want to select uncommon records which does not match how to pick?
To select uncommon records that do not match, use the NOT IN or NOT EXISTS clause in SQL.
Use the NOT IN clause to select records that do not match a specific list of values.
Use the NOT EXISTS clause to select records that do not have a matching record in a subquery.
Example: SELECT * FROM table_name WHERE column_name NOT IN (value1, value2);
Example: SELECT * FROM table1 WHERE NOT EXISTS (SELECT * FROM table2 WHERE table1.id = table2.id);
Share interview questions and help millions of jobseekers 🌟
Q7. Technical: SQL queries of join b/w three tables Sorting in descending order c program Full c code to print helloworld Little data structure,dbms Weakness HR: any movies or series recently watched and explain th...
read moreThe question asks for SQL queries for joining three tables, sorting in descending order in C program, and printing 'Hello, World!' in C.
To join three tables in SQL, use the JOIN keyword with appropriate conditions.
To sort in descending order in C, use the qsort() function with a custom comparison function.
To print 'Hello, World!' in C, use the printf() function with the desired message.
Q8. What do you know about OOPS?
OOPS stands for Object-Oriented Programming System.
OOPS is a programming paradigm that focuses on objects and their interactions.
It emphasizes on encapsulation, inheritance, and polymorphism.
Encapsulation is the process of hiding implementation details from the user.
Inheritance allows a class to inherit properties and methods from another class.
Polymorphism allows objects to take on multiple forms or behaviors.
Examples of OOPS languages include Java, C++, Python, and Ruby.
Programmer Analyst Jobs
Q9. How flexibility can help, what are its advantages and disadvantages
Flexibility can bring advantages like adaptability and creativity, but can also lead to indecisiveness and lack of focus.
Flexibility allows for adaptability to changing situations and creativity in problem-solving.
It can also lead to indecisiveness and lack of focus if not balanced with structure and clear goals.
Advantages include increased resilience, better teamwork, and improved communication.
Disadvantages include potential for burnout and difficulty in prioritizing tasks....read more
Q10. How to determine bug After bug creation what is the next need to take closing story ?
To determine a bug, identify the unexpected behavior and compare it to the expected behavior. After fixing the bug, the next step is to close the story.
To determine a bug, reproduce the unexpected behavior and compare it to the expected behavior.
Use debugging tools to identify the root cause of the bug.
After fixing the bug, test the fix to ensure it resolves the issue.
Once the fix is verified, close the story in the project management tool.
Q11. Swapping of two variables without using temporary variables
Swapping two variables without using temporary variables.
Use arithmetic operations to swap values
X = X + Y
Y = X - Y
X = X - Y
Q12. How to add moving images in flipkart?
Moving images can be added in Flipkart by using HTML and CSS animations.
Use HTML tag to insert the image
Apply CSS animations to create the moving effect
Use keyframes to define the animation behavior
Q13. Inverse of a number has to be found whose digits difference and sum was given.
To find the inverse of a number, calculate the difference and sum of its digits.
Iterate through each digit of the number to calculate the sum and difference.
Reverse the order of the digits to get the inverse number.
For example, if the number is 123, the sum of digits is 1+2+3=6 and the difference is 3-2-1=0. The inverse would be 321.
Q14. Logic behind tree and graphs codes?
Trees and graphs are used to represent hierarchical and non-linear relationships respectively in data structures and algorithms.
Trees are used to represent hierarchical relationships between data points, such as in file systems or organizational structures.
Graphs are used to represent non-linear relationships between data points, such as in social networks or transportation systems.
Both trees and graphs can be traversed using various algorithms, such as depth-first search or ...read more
Q15. Time complexity of nested for loop.
Time complexity of nested for loop.
The time complexity is O(n^k) where n is the size of the outer loop and k is the size of the inner loop.
Nested loops can lead to exponential time complexity.
Optimizing the inner loop can improve performance.
Q16. Difference between regression testing and senity testing
Regression testing is to ensure that changes made to the software do not affect existing functionality. Sanity testing is to ensure that the software is stable enough for further testing.
Regression testing is done after changes are made to the software to ensure that existing functionality is not affected.
Sanity testing is done to ensure that the software is stable enough for further testing.
Regression testing is a type of functional testing while sanity testing is a type of ...read more
Q17. What is space complexity?
Space complexity refers to the amount of memory used by an algorithm.
It is a measure of how much memory an algorithm needs to solve a problem.
It is usually expressed in terms of the amount of memory used by the algorithm as a function of the size of the input.
Space complexity can be affected by the data structures used in the algorithm.
For example, an algorithm that uses a hash table will have a higher space complexity than one that uses a simple array.
Q18. Given an array, write a code to check which number is prime number.
Code to check prime numbers in an array
Iterate through each number in the array
For each number, check if it is divisible by any number from 2 to the square root of the number
If the number is only divisible by 1 and itself, it is a prime number
Q19. Tell me some technologies that were used in IT industry
Technologies used in IT industry include cloud computing, artificial intelligence, blockchain, and internet of things.
Cloud computing: AWS, Azure, Google Cloud
Artificial intelligence: Machine learning, natural language processing
Blockchain: Bitcoin, Ethereum
Internet of things: Smart homes, wearables
Q20. Difference between a motor and generator?
A motor converts electrical energy into mechanical energy, while a generator converts mechanical energy into electrical energy.
Motors use electrical energy to create motion, while generators use motion to create electrical energy.
Motors have a rotor and a stator, while generators have a stator and a rotor.
Examples of motors include electric fans, washing machines, and power tools, while examples of generators include wind turbines and hydroelectric dams.
Q21. 1. If this a (showed an obj) and this is b, write a code to add both and get results
Code to add two objects and get results
Use the + operator to add the values of the objects
Ensure that the objects have compatible data types for addition
Handle any potential errors or exceptions that may occur during the addition
Q22. Difference between sql and sql server?
SQL is a language used to manage databases, while SQL Server is a Microsoft product that includes a database management system.
SQL is a language used to interact with databases, while SQL Server is a Microsoft product that includes a database management system.
SQL can be used with various database management systems like MySQL, Oracle, etc., while SQL Server is specific to Microsoft.
SQL is a standard language for querying and managing databases, while SQL Server provides addi...read more
Q23. What are the benefits of using python ?
Python is a versatile programming language known for its simplicity, readability, and vast library support.
Easy to learn and use, making it ideal for beginners and experienced programmers alike
Has a large standard library with built-in modules for various tasks, reducing the need for external libraries
Supports multiple programming paradigms, including procedural, object-oriented, and functional programming
Cross-platform compatibility allows code to run on different operating ...read more
Q24. What are the APIs used in those projects?
The APIs used in the projects include RESTful APIs, SOAP APIs, and custom APIs for data retrieval and integration.
RESTful APIs were used for communication between client and server in a stateless manner.
SOAP APIs were utilized for exchanging structured information in the form of XML messages.
Custom APIs were developed for specific functionalities and integrations within the projects.
Q25. Explain react in website making?
React is a JavaScript library for building user interfaces.
React allows developers to create reusable UI components.
It uses a virtual DOM for efficient rendering.
React can be used to build single-page applications.
React is maintained by Facebook and a community of developers.
React can be combined with other libraries like Redux for state management.
Q26. What is difference between while and Do while
While loop checks the condition before executing the code block, while Do while loop executes the code block first and then checks the condition.
While loop is entry controlled, Do while loop is exit controlled
While loop may not execute at all if the condition is false initially, Do while loop executes at least once
Example: while loop - while(i < 5) { //code } vs. do { //code } while(i < 5)
Q27. Which Layer in ISO OSI Model handles security
The security layer in the ISO OSI Model is the Presentation Layer.
The Presentation Layer is responsible for encryption, decryption, and data compression.
It ensures that data is securely transmitted between applications.
Examples of security protocols at this layer include SSL (Secure Sockets Layer) and TLS (Transport Layer Security).
Q28. What is sql ?
SQL is a programming language used for managing and manipulating relational databases.
SQL stands for Structured Query Language.
It is used to communicate with and manipulate databases.
SQL can be used to create, modify, and retrieve data from databases.
Common SQL commands include SELECT, INSERT, UPDATE, and DELETE.
SQL is widely used in web development and data analysis.
Q29. tell me different ways to introduce infinite loop
Different ways to introduce infinite loop in programming
Using while loop with condition that always evaluates to true
Using for loop with condition that never becomes false
Using recursion without a base case
Using goto statement to jump back to the beginning of the loop
Q30. Write a code to print your name
Code to print name
Use a print statement to output the name
Enclose the name in quotes
Separate first and last name with a space
Q31. What is data structure and algorithms?
Data structures are ways of organizing and storing data in a computer's memory, while algorithms are step-by-step procedures for solving problems.
Data structures are used to efficiently manage and manipulate data, such as arrays, linked lists, trees, graphs, etc.
Algorithms are the set of rules or steps to solve a particular problem, like sorting algorithms (e.g. bubble sort, quick sort) or searching algorithms (e.g. binary search).
Understanding data structures and algorithms ...read more
Q32. Why we use public, private and protect
Public, private and protected are access modifiers used in object-oriented programming to control the visibility of class members.
Public members can be accessed from anywhere in the program.
Private members can only be accessed within the class they are declared in.
Protected members can be accessed within the class they are declared in and any subclasses.
Access modifiers help to enforce encapsulation and prevent unauthorized access to class members.
For example, if a class has ...read more
Q33. What is SQL? What is ddl? What is dml?
SQL is a programming language used to manage and manipulate relational databases.
DDL stands for Data Definition Language and is used to define the structure of a database.
DML stands for Data Manipulation Language and is used to manipulate data within a database.
Examples of DDL commands include CREATE, ALTER, and DROP.
Examples of DML commands include SELECT, INSERT, UPDATE, and DELETE.
Q34. Any questions?
Yes, I have a few questions regarding the company culture and team dynamics.
Can you tell me more about the team I will be working with?
What is the company's approach to professional development?
How does the company foster collaboration and communication among teams?
What is the company's policy on work-life balance?
Q35. What is an interpreted language
An interpreted language is a type of programming language that executes instructions directly, without the need for compilation.
Interpreted languages are executed line by line, translating each line into machine code at runtime.
Examples of interpreted languages include Python, Ruby, and JavaScript.
Interpreted languages are generally slower than compiled languages, as they do not undergo a separate compilation step.
Q36. Compile time polymorphism vs runtime polymorphism
Compile time polymorphism is method overloading while runtime polymorphism is method overriding.
Compile time polymorphism is resolved at compile time while runtime polymorphism is resolved at runtime.
Method overloading is an example of compile time polymorphism while method overriding is an example of runtime polymorphism.
Compile time polymorphism is faster than runtime polymorphism as it is resolved at compile time.
Runtime polymorphism is more flexible than compile time poly...read more
Q37. Technological advancements in distributed file systems.
Distributed file systems have advanced with features like fault tolerance, scalability, and data consistency.
Distributed file systems allow for data to be stored across multiple servers and accessed from anywhere.
Advancements include fault tolerance to ensure data availability even if a server fails.
Scalability allows for easy expansion as data storage needs grow.
Data consistency ensures that all nodes in the system have the same view of the data.
Examples of distributed file ...read more
Q38. Call by value and call by reference difference
Call by value passes a copy of the value while call by reference passes the memory address of the value.
Call by value passes a copy of the value to the function while call by reference passes the memory address of the value.
In call by value, any changes made to the parameter inside the function do not affect the original value outside the function.
In call by reference, any changes made to the parameter inside the function affect the original value outside the function.
Call by...read more
Q39. Why is java platform independent
Java is platform independent due to its bytecode and JVM.
Java code is compiled into bytecode which is platform-neutral.
JVM (Java Virtual Machine) interprets the bytecode and executes it on any platform.
JVM acts as an abstraction layer between the code and the underlying hardware.
This allows Java programs to run on any platform that has a JVM installed.
For example, a Java program written on a Windows machine can run on a Linux machine without any modifications.
Q40. what is the difference between knowldge and wisdom
Knowledge is information gained through learning, while wisdom is the ability to apply that knowledge in a meaningful way.
Knowledge is theoretical, while wisdom is practical.
Knowledge is acquired through education and experience, while wisdom is gained through reflection and introspection.
Knowledge is objective, while wisdom is subjective.
Examples: Knowing how to drive a car is knowledge, but knowing when to drive and when not to drive is wisdom. Knowing the facts about a dis...read more
Q41. How to perform type casting in Java
Type casting in Java is the process of converting one data type into another.
Use the syntax (newType) variableName to perform type casting.
Type casting can be done implicitly or explicitly.
Explicit type casting is done by the programmer and may result in data loss if the new type cannot hold the original value.
Q42. What about python language?
Python is a high-level programming language known for its simplicity and readability.
Python is widely used for web development, data analysis, artificial intelligence, and scientific computing.
It has a large standard library and supports multiple programming paradigms.
Python code is easy to read and maintain, making it a popular choice for beginners and experienced programmers alike.
Q43. Find the second highest value in table
To find the second highest value in a table, we can use the ORDER BY and LIMIT clauses in SQL.
Write a SQL query to select all values from the table in descending order
Use the LIMIT clause to select the second row
Retrieve the value from the column containing the values
Q44. Write a program on inheritance
A program demonstrating inheritance in programming
Inheritance allows a class to inherit properties and methods from another class
The derived class can add its own properties and methods
Inheritance promotes code reusability and modularity
Example: Creating a base class 'Animal' with properties like 'name' and 'age', and a derived class 'Dog' inheriting from 'Animal' with an additional property 'breed'
Q45. What is object oriented programming
Object oriented programming is a programming paradigm that uses objects to represent and manipulate data.
Objects encapsulate data and behavior
Classes define the blueprint for objects
Inheritance allows for the creation of subclasses with shared characteristics
Polymorphism allows for objects to take on multiple forms
Examples include Java, Python, and C++
Q46. 4 pillars of object oriented programming
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 multiple types of objects.
Q47. Difference between java and c++
Java is platform-independent, while C++ is not. Java uses automatic memory management, while C++ requires manual memory management.
Java is platform-independent, meaning that Java programs can run on any operating system that has a Java Virtual Machine (JVM). C++ programs, on the other hand, are compiled into machine code specific to the target platform.
Java uses automatic memory management through garbage collection, which automatically frees up memory that is no longer neede...read more
Q48. Explain normalisation and types
Normalization is the process of organizing data in a database to eliminate redundancy and improve data integrity.
Normalization is used to minimize data duplication and ensure consistency.
There are different normal forms (1NF, 2NF, 3NF, etc.) that define specific rules for organizing data.
Normalization helps in reducing data anomalies and improving database performance.
Normalization involves breaking down a large table into smaller, more manageable tables.
Each normal form has ...read more
Q49. How to use static in class?
Static keyword is used to create class-level variables and methods that can be accessed without creating an instance of the class.
Static variables and methods are declared using the keyword 'static'
Static variables are shared among all instances of the class
Static methods can be called without creating an instance of the class
Static methods cannot access non-static variables or methods
Example: public static int count = 0; // static variable
Example: public static void printCou...read more
Q50. When and how to use functions?
Functions are used to break down complex tasks into smaller, reusable parts.
Functions should be used when a task needs to be performed multiple times in a program.
Functions make code more organized and easier to read.
Functions can take parameters and return values to make them more versatile.
Functions can be used to break down complex tasks into smaller, more manageable parts.
Functions can be used to improve code reusability and reduce redundancy.
Interview Questions of Similar Designations
Top Interview Questions for Programmer Analyst 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