Add office photos
Engaged Employer

GlobalLogic

3.7
based on 4.3k Reviews
Filter interviews by

40+ Capita Interview Questions and Answers

Updated 8 Jan 2025
Popular Designations
Q1. Puzzle Question

The interviewer called three interviewees together and gave us puzzles like there are 3 jugs with a capacity of 2,5,3 Litres. How will you measure 4 Litres of water from these jugs? Another was t...read more

View 2 more answers
Q2. System Design

#include Class Temp
{
private:
int m_ival;
public:
Temp()
{
Cout<<"OBJECT CREATED\n"< }
~Temp()
{
Cout<<"OBJECT DESTROYED\n"< }
};
void fnRead()
{
Temp oTempObj;
}
int main()
{
fnRead();
cout<<"IN MAIN \n"< return 0...read more

Add your answer
Q3. MCQ Questions

Aptitude section (around 15 questions) -- topics from basic mathematics like time, speed & distance, algebra, arithmetic, probability, geometry, permutation & combination
Verbal section (around 15 q...read more

Add your answer

Q4. What is the IDisposal? Give an example used in the applicstion.

Ans.

IDisposable is an interface used to release unmanaged resources.

  • It is used to release unmanaged resources like file handles, database connections, etc.

  • It has a single method called Dispose() which is used to release the resources.

  • It is implemented by classes that use unmanaged resources and needs to be disposed of.

  • Example: SqlConnection class implements IDisposable to release the database connection.

  • Example: FileStream class implements IDisposable to release the file handle.

Add your answer
Discover Capita interview dos and don'ts from real experiences

Q5. What is Solid Principle? Give the examples used in your application.

Ans.

SOLID is a set of principles for object-oriented programming to make software more maintainable and scalable.

  • S - Single Responsibility Principle

  • O - Open/Closed Principle

  • L - Liskov Substitution Principle

  • I - Interface Segregation Principle

  • D - Dependency Inversion Principle

  • Example: Using Single Responsibility Principle to separate UI and business logic

  • Example: Using Open/Closed Principle to extend functionality without modifying existing code

Add your answer

Q6. How you will handle Exceptions in Spring Boot?

Ans.

Exceptions in Spring Boot can be handled using @ExceptionHandler annotation and ResponseEntity class.

  • Use @ExceptionHandler annotation to handle exceptions in a specific controller or globally

  • Use ResponseEntity class to return a custom error message and HTTP status code

  • Use try-catch block to handle exceptions in service layer

  • Use @ControllerAdvice annotation to handle exceptions globally across all controllers

  • Use @ResponseStatus annotation to set a default HTTP status code for ...read more

Add your answer
Are these interview questions helpful?

Q7. code to find the occurence of character in a string.

Ans.

Code to find the occurrence of a character in a string.

  • Iterate through the string and check each character against the target character.

  • Use a loop to count the number of occurrences.

  • Consider using built-in functions like count() or find().

Add your answer

Q8. Write the code to concatenate the value with comma in the given array. int[] arr = {1, 2, 3,4,5}

Ans.

Concatenate the values in the given integer array with comma.

  • Convert the integer array to string array using Arrays.toString()

  • Use String.join() method to concatenate with comma

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. What is inheritance, abstract class, override, Interface and everything in oops.

Ans.

Inheritance, abstract class, override, and interface are all concepts in object-oriented programming.

  • Inheritance allows a class to inherit properties and methods from another class.

  • Abstract classes cannot be instantiated and are used as a blueprint for other classes.

  • Override is used to provide a new implementation for a method that is already defined in a parent class.

  • Interfaces define a set of methods that a class must implement.

  • All of these concepts are used to create modul...read more

Add your answer

Q10. php caching techniques, how session works in PHP? What are the security to prevent token hijack in API?

Ans.

PHP caching, session handling, and API token security

  • PHP caching techniques include opcode caching, data caching, and query caching

  • Session handling in PHP involves creating a unique session ID for each user and storing session data on the server

  • To prevent token hijacking in APIs, use HTTPS, set expiration times for tokens, and use token revocation

  • Other security measures include input validation, output encoding, and using secure coding practices

Add your answer

Q11. What is Dependency Injection and how can we inplement those?

Ans.

Dependency Injection is a design pattern that allows objects to receive dependencies rather than creating them internally.

  • Dependency Injection is used to reduce tight coupling between software components.

  • It allows for easier testing and maintenance of code.

  • There are three types of Dependency Injection: Constructor Injection, Setter Injection, and Interface Injection.

  • Frameworks like Spring and Angular provide built-in support for Dependency Injection.

Add your answer

Q12. Is it possible to instanciate the abstract class? Explain.

Ans.

No, abstract classes cannot be instantiated.

  • Abstract classes are incomplete and cannot be instantiated on their own.

  • They can only be used as a base class for other classes.

  • Instantiation of an abstract class will result in a compile-time error.

  • However, concrete classes that inherit from the abstract class can be instantiated.

Add your answer

Q13. What do you know about the constructors and destructors?

Ans.

Constructors and destructors are special methods used in object-oriented programming languages to initialize and destroy objects.

  • Constructors are used to initialize objects when they are created.

  • Destructors are used to clean up resources used by an object when it is destroyed.

  • Constructors have the same name as the class and are called automatically when an object is created.

  • Destructors have the same name as the class preceded by a tilde (~) and are called automatically when a...read more

Add your answer
Q14. SQL Questions

Basic SQL Queries like Write a query to retrieve the first four characters of EmpLname from the given EmployeeInfo table etc.

Add your answer

Q15. MySql: what are store procedures, Indexes and virtual tables.

Ans.

Store procedures, indexes, and virtual tables are important features of MySql.

  • Store procedures are pre-written code blocks that can be executed on demand.

  • Indexes are used to speed up database queries by creating a quick lookup table.

  • Virtual tables are temporary tables that are created on the fly and do not persist in the database.

  • Examples of store procedures include creating a new user or updating a record.

  • Examples of indexes include primary keys, unique keys, and full-text i...read more

Add your answer

Q16. Code to check the strings are anagram or not

Ans.

Code to check if two strings are anagram or not

  • An anagram is a word or phrase formed by rearranging the letters of a different word or phrase

  • To check if two strings are anagram, we can sort both strings and compare them

  • Alternatively, we can use a hash table to count the frequency of each character in both strings and compare the counts

Add your answer

Q17. How can we remove duplicate objects from array of multiple objects.

Ans.

Remove duplicate objects from an array of multiple objects.

  • Create a new array to store unique objects

  • Loop through the original array and check if the object already exists in the new array

  • If not, add it to the new array

  • Return the new array

Add your answer

Q18. Explain about the design pattern used in your application.

Ans.

We used the Model-View-Controller (MVC) design pattern in our application.

  • MVC separates the application into three interconnected components: the model, the view, and the controller.

  • The model represents the data and business logic of the application.

  • The view displays the data to the user.

  • The controller handles user input and updates the model and view accordingly.

  • MVC promotes separation of concerns and modularity.

  • Example: Our web application uses AngularJS as the front-end fr...read more

Add your answer

Q19. What is serialisation and serialisation where actually it used?

Ans.

Serialisation is the process of converting an object into a format that can be easily stored or transmitted.

  • Serialisation is used in data storage and transmission, allowing objects to be saved to a file or sent over a network.

  • It is commonly used in programming languages to convert objects into a byte stream for storage or communication.

  • Examples include saving an object to a file in JSON or XML format, or sending an object over a network using protocols like HTTP.

Add your answer

Q20. Explaination of Interface and Abstract classes.

Ans.

Interfaces and abstract classes are used for abstraction and defining contracts.

  • Interfaces are a collection of abstract methods that define a contract for a class to implement.

  • Abstract classes are classes that cannot be instantiated and can have both abstract and concrete methods.

  • Interfaces can be implemented by multiple classes, while a class can only inherit from one abstract class.

  • Interfaces are used for loose coupling and to achieve multiple inheritance-like behavior.

  • Abst...read more

Add your answer

Q21. How to maintain state if code if repeated one.

Ans.

Maintain state by using a global variable or a state management system.

  • Use a global variable to store the state and access it whenever needed.

  • Use a state management system like Redux or MobX to manage the state.

  • Avoid using local variables or closures to store state as they will be lost when the code is repeated.

  • Consider using object-oriented programming principles to encapsulate state within objects.

  • Use functional programming principles to avoid mutating state directly.

  • Consid...read more

Add your answer

Q22. What is full text index?

Ans.

Full text index is a database index that allows for efficient text-based searching.

  • Full text index is used to search for specific words or phrases within a large amount of text data.

  • It is commonly used in search engines, document management systems, and social media platforms.

  • Full text index can be created on one or more columns of a table in a database.

  • It uses techniques such as stemming, stop words, and word proximity to improve search accuracy.

  • Examples of databases that su...read more

Add your answer

Q23. Difference between Compile Time Polymorphism and Runtime Polymorphism

Ans.

Compile time polymorphism is achieved through function overloading and operator overloading, while runtime polymorphism is achieved through function overriding using virtual functions.

  • Compile time polymorphism is resolved during compile time based on the number and types of arguments passed to a function.

  • Runtime polymorphism is resolved during runtime based on the actual object being referred to by a base class pointer or reference.

  • Compile time polymorphism is also known as s...read more

Add your answer

Q24. Write Java Program to Reverse given String. By sharing Screen.

Ans.

Java program to reverse a given string using StringBuilder

  • Create a StringBuilder object with the given string

  • Use the reverse() method of StringBuilder to reverse the string

  • Convert the reversed StringBuilder object back to a string

Add your answer

Q25. difference between php 5 and php 7?

Ans.

PHP 7 is faster, more secure and has new features compared to PHP 5.

  • PHP 7 has improved performance with up to 2x faster execution

  • PHP 7 has better error handling and type declarations

  • PHP 7 has new operators and functions like spaceship operator and null coalescing operator

  • PHP 7 has removed deprecated features like mysql extension

  • PHP 7 has improved support for Unicode

  • PHP 7 requires 64-bit architecture

  • PHP 7 has improved memory usage

  • PHP 7 has improved support for anonymous classe...read more

Add your answer

Q26. what is diff b/w HTML5 vs HTML?

Ans.

HTML5 is the latest version of HTML with new features and improvements.

  • HTML5 supports new elements like <header>, <footer>, <nav>, <article>, <section> etc.

  • HTML5 introduces new APIs like Geolocation API, Drag and Drop API, Canvas API, Web Storage API, etc.

  • HTML5 supports multimedia elements like <audio> and <video> without the need for plugins.

  • HTML5 has improved semantics, accessibility, and performance compared to HTML.

  • HTML5 supports offline web applications through the use o...read more

Add your answer

Q27. What is sql definition and uses?

Ans.

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 retrieve data, update data, insert data, and delete data from databases.

  • Common SQL commands include SELECT, INSERT, UPDATE, DELETE.

  • Examples of SQL database systems include MySQL, PostgreSQL, Oracle, SQL Server.

Add your answer

Q28. Count number of occurences of characters in a string

Ans.

Count occurrences of characters in a string

  • Iterate through the string and use a hashmap to store character counts

  • Handle both uppercase and lowercase characters separately

  • Consider using ASCII values for efficient counting

Add your answer

Q29. What is java and explain it's concepts.

Ans.

Java is a high-level programming language known for its portability, security, and object-oriented features.

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

  • It is object-oriented, allowing for the creation of reusable code through classes and objects.

  • Java is known for its security features, such as sandboxing and encryption.

  • It supports multithreading, allowing for concurrent execution of multiple tasks.

  • Java has a rich standard l...read more

Add your answer

Q30. What is quick sort in data structure?

Ans.

Quick sort is a sorting algorithm that uses divide and conquer approach to sort an array or list.

  • It selects a pivot element and partitions the other elements into two sub-arrays, according to whether they are less than or greater than the pivot.

  • It then recursively sorts the sub-arrays.

  • It is a very efficient sorting algorithm with an average time complexity of O(n log n).

Add your answer

Q31. Who has invented java language.

Ans.

James Gosling, Mike Sheridan, and Patrick Naughton invented the Java language.

  • Invented by James Gosling, Mike Sheridan, and Patrick Naughton at Sun Microsystems in the early 1990s.

  • Java was originally developed to be used in consumer electronic devices like set-top boxes.

  • Released in 1995 as a core component of Sun Microsystems' Java platform.

  • Known for its platform independence, allowing code to run on any device that has a Java Virtual Machine (JVM).

Add your answer

Q32. what are different keys in sql

Ans.

Different keys in SQL include primary key, foreign key, unique key, and composite key.

  • Primary key uniquely identifies each record in a table

  • Foreign key establishes a relationship between two tables

  • Unique key ensures that all values in a column are unique

  • Composite key is a combination of multiple columns to uniquely identify a record

Add your answer

Q33. Difference between function and stored procedure

Ans.

Function is a reusable block of code that returns a value, while stored procedure is a group of SQL statements that can be executed together.

  • Functions return a single value, while stored procedures can return multiple values.

  • Functions are called in SQL queries, while stored procedures are called using EXECUTE statement.

  • Functions cannot modify database state, while stored procedures can.

  • Functions are easier to test and debug compared to stored procedures.

  • Example: Function to c...read more

Add your answer

Q34. What is linked list in data structure

Ans.

A linked list is a linear data structure where each element is a separate object with a pointer to the next element.

  • Consists of nodes that contain data and a pointer to the next node

  • Can be singly linked or doubly linked

  • Allows for efficient insertion and deletion operations

  • Example: Linked list can be used to implement a stack or queue

Add your answer

Q35. what is state management?

Ans.

State management is the process of managing the state of an application, including data flow, user interface updates, and user interactions.

  • State management involves storing and updating the current state of an application.

  • It helps in managing data flow between different components of the application.

  • State management is crucial for ensuring that user interface updates reflect the most recent data.

  • Examples of state management tools include Redux, MobX, and Context API in React...read more

Add your answer

Q36. Count the frequency of the charcters in a word

Ans.

To count the frequency of characters in a word, iterate through the word and store the count of each character in a data structure.

  • Create a map or dictionary to store the count of each character

  • Iterate through the word and update the count of each character in the map

  • Return the map with character frequencies

Add your answer

Q37. Flowcharts of If and Nested If Scenarios

Ans.

Understanding flowcharts for If and Nested If scenarios in software engineering.

  • Flowcharts visually represent the logic of a program using symbols and arrows.

  • If statements are represented by a diamond shape with a condition inside.

  • Nested If scenarios involve multiple levels of If statements within each other.

  • Each branch in a flowchart represents a possible path the program can take based on conditions.

  • Example: If x > 5, do A. If x < 5, do B. If y > 10, do C.

  • Example: If x > 5,...read more

Add your answer

Q38. What is MVC architecture

Ans.

MVC architecture is a software design pattern that separates an application into three main components: Model, View, and Controller.

  • Model represents the data and business logic of the application

  • View is responsible for displaying the data to the user

  • Controller acts as an intermediary between Model and View, handling user input and updating the Model accordingly

  • Example: In a web application, the Model could be a database, the View could be the HTML/CSS for the user interface, ...read more

Add your answer

Q39. Design patterns in android system

Ans.

Design patterns are reusable solutions to common software problems. Android system uses various design patterns.

  • MVC (Model-View-Controller) pattern is used in Android to separate UI logic from business logic.

  • Singleton pattern is used to ensure only one instance of a class is created.

  • Observer pattern is used to notify changes in data to multiple components.

  • Builder pattern is used to simplify complex object creation.

  • Adapter pattern is used to convert the interface of a class in...read more

Add your answer

Q40. How to store memory?

Ans.

Memory can be stored in various ways such as RAM, ROM, hard drives, and cloud storage.

  • Memory can be stored in Random Access Memory (RAM) for quick access by the CPU.

  • Read-Only Memory (ROM) stores permanent data that cannot be modified.

  • Hard drives store data magnetically on spinning disks or solid-state drives.

  • Cloud storage allows data to be stored remotely on servers accessed over the internet.

Add your answer

Q41. What is unique key?

Ans.

A unique key is a field or combination of fields in a database table that uniquely identifies each record in the table.

  • A unique key ensures that no two records in a table have the same values for the specified key fields.

  • It can be a single field or a combination of multiple fields.

  • Unique keys are used to enforce data integrity and prevent duplicate entries.

Add your answer

Q42. What is Collections?

Ans.

Collections are classes that group similar objects together and provide methods to operate on them.

  • Collections are used to store and manipulate groups of objects

  • They provide methods to add, remove, and access elements in the collection

  • Examples include ArrayList, LinkedList, HashSet, and TreeMap

Add your answer

Q43. what are promises

Ans.

Promises are a feature in JavaScript that allow asynchronous operations to be handled in a more organized and readable way.

  • Promises are objects that represent the eventual completion or failure of an asynchronous operation.

  • They are used to handle asynchronous code and avoid callback hell.

  • Promises have three states: pending, fulfilled, or rejected.

  • They can be chained together using methods like .then() and .catch().

  • Promises can be created using the Promise constructor or by us...read more

Add your answer

Q44. what is event loop

Ans.

Event loop is a mechanism that allows a program to efficiently handle and respond to multiple events or tasks concurrently.

  • Event loop is commonly used in asynchronous programming.

  • It manages the execution of tasks or events in a non-blocking manner.

  • Event loop continuously checks for events or tasks and executes them when they are ready.

  • It helps prevent blocking and allows for efficient utilization of system resources.

  • Examples of event loop implementations include Node.js event...read more

Add your answer

Q45. Write any select query

Ans.

Select query to retrieve employee details from a database

  • Use SELECT statement

  • Specify the columns to retrieve

  • Specify the table name

  • Optional: Use WHERE clause for filtering

Add your answer

Q46. String reverse program

Ans.

A program to reverse a given string.

  • Use a loop to iterate through the characters of the string.

  • Create a new string and append each character from the original string in reverse order.

  • Return the reversed string.

Add your answer

Q47. 4 pillers of oops

Ans.

The 4 pillars of OOP are encapsulation, inheritance, polymorphism, and abstraction.

  • Encapsulation: Bundling data and methods that operate on the data into a single unit.

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

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Capita

based on 29 interviews in the last 1 year
3 Interview rounds
Technical Round 1
Technical Round 2
HR Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Engineer Interview Questions from Similar Companies

3.6
 • 36 Interview Questions
3.7
 • 15 Interview Questions
4.1
 • 11 Interview Questions
3.3
 • 10 Interview Questions
View all
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
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

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