Add office photos
Engaged Employer

CGI Group

4.0
based on 4.2k Reviews
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by

300+ Interview Questions and Answers

Updated 13 Dec 2024
Popular Designations
Q1. Compress the String

Ninja has been given a program to do basic string compression. For a character that is consecutively repeated more than once, he needs to replace the consecutive duplicate occurrences with th...read more

View 3 more answers
Q2. Frog Jump

There is a frog on the 1st step of an N stairs long staircase. The frog wants to reach the Nth stair. HEIGHT[i] is the height of the (i+1)th stair.If Frog jumps from ith to jth stair, the energy lost i...read more

View 4 more answers
Q3. Palindromic Substrings

You have been given a string STR. Your task is to find the total number of palindromic substrings of STR.

Example :
If the input string is "abbc", then all the possible palindromic substri...read more
View 6 more answers
Q4. Anagram Pairs

Pre-requisites: Anagrams are defined as words or names that can be formed by rearranging letters of another word. Such as "spar" can be formed by rearranging letters of "rasp". Hence, "spar" and "r...read more

View 3 more answers
Discover null interview dos and don'ts from real experiences
Q5. Power Set

You are given a sorted array of 'N' integers. You have to generate the power set for this array where each subset of this power set is individually sorted.

A set is a well-defined collection of distinc...read more

View 4 more answers
Q6. Pythagorean Triplets

You are given an array of n integers (a1, a2,....,an), you need to find if the array contains a pythagorean triplet or not.

An array is said to have a pythagorean triplet if there exists thr...read more

View 4 more answers
Are these interview questions helpful?
Q7. Intersection of Linked List

You are given two Singly Linked List of integers, which are merging at some node of a third linked list.

Your task is to find the data of the node at which merging starts. If there is...read more

View 4 more answers
Q8. Preorder traversal of a BST

You have been given an array/list 'PREORDER' representing the preorder traversal of a BST with 'N' nodes. All the elements in the given array have distinct values.

Your task is to con...read more

View 3 more answers
Share interview questions and help millions of jobseekers 🌟
Q9. Remove Vowels

You are given a string STR of length N. Your task is to remove all the vowels present in that string and print the modified string.

English alphabets ‘a’, ‘e’, ‘i’, ‘o’, ‘u’ are termed as vowels. A...read more

View 3 more answers
Q10. Spiral Matrix

You are given a N x M matrix of integers, print the spiral path of the matrix.

For example:

Spiral Path

Input Format:
The first line contains an integer 'T' which denotes the number of test cases or queries t...read more
View 4 more answers
Q11. Java Question

What are the various access specifiers in Java?

Add your answer
Q12. Two Sum

You are given an array of integers 'ARR' of length 'N' and an integer Target. Your task is to return all pairs of elements such that they add up to Target.

Note:

We cannot use the element at a given inde...read more
View 2 more answers
Q13. Concatenate the largest digit

You are given three non-zero numbers ‘A’, ‘B’, and ‘C’. The task is to find the number formed by concatenating the largest digit from each of these numbers in the order of ‘A’, ‘B’,...read more

View 2 more answers
Q14. Java Question

How many types of memory areas are allocated by JVM?

Add your answer

Q15. 1,Diff bwn aggregation and composition? 2,w a p to print fibnoci sries? with recursion? 3,Diff bwn interface and abstract? 4,w ap to print * patteren? * ** *** **** 5,Explain custom immutable class? 6,what is i...

read more
Ans.

This JSON contains answers to interview questions for a Software Engineer position.

  • Aggregation and composition are both forms of association in object-oriented programming.

  • Aggregation represents a 'has-a' relationship, where one object contains another object as a part.

  • Composition is a stronger form of aggregation, where the lifetime of the contained object is controlled by the container object.

  • Fibonacci series can be printed using recursion by defining a recursive function t...read more

Add your answer
Q16. Design Pattern Question

What are the types of design patterns in Java?

Add your answer
Q17. Spring Boot Question

What is the purpose of using @ComponentScan in the class files?

Add your answer
Q18. Java Question

What do you know about JIT compiler?

Add your answer
Q19. Spring Boot Question

What Are the Basic Annotations that Spring Boot Offers?

Add your answer
Q20. OOPS, DBMS, OS Questions

OOPS concepts with real time example
SQL statements paper based
Pointers are available in java if not available why
Diff between unions and structures
Concept on procedures and functions i...read more

Add your answer
Q21. Java Question

What is the difference between JDK, JRE, and JVM?

Add your answer
Q22. SQL Question

Write a query that joins two tables A and B having common attribute ID and selects records(ID_NAME) that have
matching ID values in both tables .

Add your answer
Q23. OOPS Question

What do you mean by data encapsulation?

Add your answer
Q24. Python Question

What are global, protected and private attributes in Python?

Add your answer
Q25. Spring Boot Question

What is dependency Injection?

Add your answer
Q26. Data Warehouse Question

What is a Slowly Changing Dimension (SCD)? What are the different types of SCDs?

Add your answer

Q27. What is the difference between emergency and urgent change? Emergency change is raised to resolve an incident. It doesn’t follow the normal change process and do not have a lead time. ECAB needs to be arranged....

read more
Ans.

Emergency change is raised to resolve an incident while urgent change needs top level approvals to proceed.

  • Emergency change is not a part of the normal change process and does not have a lead time.

  • ECAB needs to be arranged for emergency change.

  • Urgent change needs to be implemented on an urgent basis and cannot wait to follow the entire change process.

  • Top level approvals are required for urgent change to proceed.

Add your answer
Q28. DBMS Question

What is the main difference between UNION and UNION ALL?

Add your answer
Q29. OOPS Question

Explain the use of final keyword in variable, method and class.

Add your answer

Q30. What happens when a change is unsuccessful? When a change fails a PIR call needs to be arranged in order to understand the reason and root cause of the failure also what differently would be done next time to a...

read more
Ans.

A PIR is conducted to understand the reason and root cause of the failure and to document and update it.

  • Conduct a PIR to understand the reason and root cause of the failure

  • Document and update the PIR

  • Identify what could be done differently next time to avoid such a situation

Add your answer
Q31. DBMS Question

What is Cursor? How to use a Cursor?

Add your answer
Q32. Python Question

What is pickling and unpickling?

Add your answer
Q33. Multithreading Question

What is the difference between the interrupted() and isInterrupted() method in Java?

Add your answer
Q34. Data Warehouse Question

What are the different types of data marts in the context of data warehousing?

Add your answer
Q35. SQL Question

Given an Employee Table, find the Nth highest salary from it.

Add your answer
Q36. Python Question

What is the use of self in Python?

Add your answer
Q37. Python Question

What is init method in python?

Add your answer
Q38. Python Question

How does inheritance work in python?

Add your answer

Q39. how can you improve performance of your spring boot application

Ans.

To improve performance of a Spring Boot application, consider optimizing database queries, caching, using asynchronous processing, and monitoring performance metrics.

  • Optimize database queries by using indexes, avoiding N+1 queries, and limiting the amount of data fetched.

  • Implement caching to store frequently accessed data in memory, reducing the need to fetch data from the database repeatedly.

  • Use asynchronous processing for time-consuming tasks to free up resources and improv...read more

Add your answer

Q40. how did you implement logging in your springboot application

Ans.

Implemented logging in Spring Boot application using SLF4J and Logback

  • Added dependencies for SLF4J and Logback in pom.xml

  • Configured logback.xml for logging levels and appenders

  • Injected Logger instances using @Autowired annotation in classes

  • Used logger.debug(), logger.info(), logger.error() methods for logging

Add your answer
Q41. Python Question

What is the difference between Python Arrays and lists?

Add your answer
Q42. OOPS Question

Difference between Abstract class and Interface.

Add your answer
Q43. DBMS Question

How to delete Duplicates From a Table in SQL Server?

Add your answer
Q44. OS Question

Print 1 to 100 using more than two threads(optimized approach).

Add your answer
Q45. Java Question

What are Java 8 streams?

View 4 more answers
Q46. Java Question

What are the features of a lambda expression?

View 4 more answers
Q47. Big Data Question

How to deploy a Big Data Model? Mention the key steps involved

Add your answer

Q48. Coding question - 1. Create a immutable class of orders. What happens when two objects are created out of it. 2.Using the immutable orders create a set of orders and how will you sort these out. 3.Given a List ...

read more
Ans.

Creating immutable class of orders, sorting orders, finding average of lists of integers.

  • Create an immutable class Orders with private final fields and no setter methods.

  • Override equals() and hashCode() methods to ensure uniqueness of objects.

  • Use Collections.unmodifiableSet() to create a set of orders and Collections.sort() to sort them.

  • Iterate through the List of List of String of integers, convert to integers, and calculate average for each list.

Add your answer

Q49. a clock tick 8 times on 8'o clock the time taken between 1st tick and last tick is 35 sec what is the time taken for starting tick and end tick at 11'o colck

Ans.

The time taken for the clock to tick from 8'o clock to 11'o clock is 105 seconds.

  • Each tick represents 1/8th of an hour (45 minutes) on the clock.

  • From 8'o clock to 11'o clock, there are 3 hours, so the total time taken is 3 * 45 = 135 minutes = 135 * 60 = 8100 seconds.

  • The time taken for the clock to tick from 8'o clock to 11'o clock is 8100 - 35 = 8065 seconds.

Add your answer
Q50. Hibernate Question

Can you tell the difference between setMaxResults() and setFetchSize() of Query?

Add your answer
Q51. Big Data Question

Explain overfitting in big data? How to avoid the same.

Add your answer
Q52. How will you solve real time examples in smart way?
Add your answer
Q53. Java Question

What are the advantages of Packages in Java?

Add your answer
Q54. Java Question

Why Java is platform independent and JVM platform dependent?

Add your answer
Q55. DBMS

How to get second max salary from table?

Add your answer
Q56. DBMS Question

What is the use of DROP command and what are the differences between DROP, TRUNCATE and DELETE
commands?

Add your answer
Q57. Multithreading Question

What is race condition in Java? Given one example.

Add your answer
Q58. SQL Question

What is the difference between CHAR and VARCHAR2 datatype in SQL?

Add your answer
Q59. Data Warehouse Question

What do you mean by Degenerate Dimension?

Add your answer

Q60. Write a code to find Number of occurrences of a word in a string

Ans.

Code to find number of occurrences of a word in a string

  • Split the string into an array of words

  • Loop through the array and count the occurrences of the given word

Add your answer
Q61. ETL (Extract, Transform, and Load) Question

State difference between ETL testing and manual testing.

Add your answer
Q62. Selenium Question

Why should Selenium be selected as a testing tool for web applications or systems?

Add your answer
Q63. Linux Question

How do you check how much space left in current drive ?

Add your answer
Q64. Hibernate Question

What are the concurrency strategies available in hibernate?

Add your answer
Q65. ETL (Extract, Transform, and Load) Question

What do you know about the Bus Schema in ETL.

Add your answer

Q66. What is pass by reference and pass by value

Ans.

Pass by reference and pass by value are two ways of passing arguments to a function.

  • Pass by value means a copy of the argument is passed to the function

  • Pass by reference means the memory address of the argument is passed to the function

  • Pass by value is used for primitive data types like int, float, etc.

  • Pass by reference is used for complex data types like arrays, objects, etc.

Add your answer
Q67. Cucumber Question

How can you run a selected test from a group of tests in Cucumber?

Add your answer
Q68. OS Question

Difference between Process and Program

Add your answer
Q69. Linux Question

How do you find all the process which has opened a file in Linux?

Add your answer
Q70. Linux Question

What is LVM and why is it required?

Add your answer
Q71. Spring Boot Question

Explain @RestController annotation in Sprint boot?

Add your answer
Q72. C# Question

What is the difference between an Array and ArrayList in C#?

Add your answer

Q73. Singleton can be broken by cloning, how to prevent it?

Ans.

To prevent Singleton from being broken by cloning, we can override the clone method and throw an exception.

  • Override the clone method in the Singleton class and throw an exception to prevent cloning.

  • Alternatively, you can return the same instance in the clone method instead of creating a new instance.

  • Use serialization and deserialization to create a new instance of the Singleton class.

Add your answer
Q74. DBMS Question

How to Take a Backup of a Table in MySQL?

Add your answer
Q75. Hibernate Question

Can you tell something about the N+1 SELECT problem in Hibernate?

Add your answer

Q76. When a function is passed as an argument to another function. Then it is a callback function

Ans.

Yes, a callback function is a function that is passed as an argument to another function.

  • Callback functions are commonly used in event handling, asynchronous programming, and functional programming.

  • Example: setTimeout(function() { console.log('Hello!'); }, 1000);

  • Example: array.map(function(item) { return item * 2; });

Add your answer
Q77. Hibernate Question

What is hibernate caching?

Add your answer
Q78. Java Question

Explain the use of final keyword in variable, method and class.

Add your answer
Q79. Hadoop Question

Explain Hadoop. List the core components of Hadoop

Add your answer
Q80. ETL (Extract, Transform, and Load) Question

State difference between ETL and OLAP (Online Analytical Processing) tools.

Add your answer

Q81. What is intial sql, how and when do you write catom sql in tableau, what is cat in sql...and some project related questions

Ans.

Initial SQL is a feature in Tableau that allows users to write custom SQL queries to connect to data sources.

  • Initial SQL is used to execute SQL statements before the main query is executed.

  • Custom SQL can be written in Tableau to connect to data sources that do not have a built-in connector.

  • CAT in SQL stands for Concatenate and is used to combine two or more strings into a single string.

  • Project related questions may vary depending on the specific project and requirements.

Add your answer
Q82. Linux Question

What is the meaning of a file that has 644 permission?

Add your answer
Q83. OS Question

Difference between Process and Thread

Add your answer
Q84. BDD Question

Explain briefly how Behavioral Driven Development works?

Add your answer
Q85. Automation Testing Question

How do you automate the testing of CAPTCHA?

Add your answer
Q86. Hadoop Question

Explain the Storage Unit In Hadoop (HDFS).

Ans.

HDFS is the storage unit in Hadoop, providing fault-tolerant and scalable storage for big data.

  • HDFS divides data into blocks and stores them across multiple machines in a cluster.

  • It replicates data for fault tolerance, with default replication factor of 3.

  • HDFS supports streaming data access and is optimized for large sequential reads.

  • It provides high throughput and reliability for big data processing.

  • HDFS is suitable for storing and processing large datasets in parallel.

View 1 answer

Q87. How are 4-5 microservices connected in rest api's? which technique you are using?

Ans.

Microservices are connected in REST APIs using communication protocols like HTTP, messaging queues, and service discovery.

  • Microservices communicate with each other using HTTP requests and responses.

  • Messaging queues like RabbitMQ or Kafka can be used for asynchronous communication between microservices.

  • Service discovery tools like Eureka or Consul help in locating and connecting to different microservices.

  • API Gateway can be used to aggregate multiple microservices into a singl...read more

Add your answer
Q88. OS Question

What do chmod, chown, chgrp commands do?

Add your answer

Q89. Are you aware of DevOp? How to use in producing output for client?

Ans.

Yes, DevOps is a set of practices that combines software development and IT operations to deliver high-quality software faster.

  • DevOps is a culture and set of practices that emphasizes collaboration, automation, and monitoring throughout the software development lifecycle.

  • It involves integrating development, testing, deployment, and operations teams to streamline the software delivery process.

  • By using DevOps, database architects can ensure faster and more reliable delivery of ...read more

View 1 answer
Q90. Linux Question

What is a “/proc” file system?

Add your answer

Q91. what is oop concept, difference b/w interface and abstract class

Ans.

OOP concept focuses on creating objects that interact with each other. Interface is a contract for classes to implement, while abstract class can have some implemented methods.

  • OOP concept involves creating objects that have properties and methods to interact with each other

  • Interface is a contract that defines a set of methods that a class must implement

  • Abstract class can have some implemented methods along with abstract methods that must be implemented by subclasses

Add your answer
Q92. Java Design Pattern Question

Explain the Singleton pattern?

Add your answer
Q93. SQL Question

What is the view in SQL?

Add your answer
Q94. DBMS Question

Difference b/w INNER JOIN and OUTER JOIN in SQL.

Add your answer

Q95. How to creat web page by using html and css

Ans.

HTML and CSS are used to create web pages.

  • Start with creating the basic structure of the page using HTML tags.

  • Use CSS to style the page and make it visually appealing.

  • Add content to the page using HTML tags.

  • Use CSS to position and layout the content on the page.

  • Test the page in different browsers to ensure compatibility.

Add your answer

Q96. How many times we use for loop in single program

Ans.

The number of times a for loop is used in a program varies depending on the program's requirements.

  • The number of for loops used in a program depends on the program's logic and requirements.

  • For loops are used to iterate over arrays, lists, and other data structures.

  • Nested for loops are used to iterate over multi-dimensional arrays.

  • For loops can also be used for counting and other repetitive tasks.

  • The number of for loops used in a program can range from zero to many.

Add your answer
Q97. Linux Question

Write a command to print the lines that has the word "july" while ignoring the case.

Add your answer

Q98. write the queries to find out nth and 3rd highest record

Ans.

Use SQL queries with ORDER BY and LIMIT to find nth and 3rd highest record.

  • Use ORDER BY column_name DESC to sort records in descending order

  • Use LIMIT 1 OFFSET n-1 to get the nth highest record

  • For 3rd highest record, use LIMIT 1 OFFSET 2

Add your answer
Q99. Data Warehouse Question

Explain ETL Process in Data Warehouse

Add your answer
Q100. Data Warehouse Question

Difference between Fact Table and Dimension Table

Add your answer
1
2
3
4

More about working at CGI Group

Top Rated Company for Women - 2024
Top Rated IT/ITES Company - 2024
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at null

based on 229 interviews in the last 1 year
Interview experience
4.1
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

3.9
 • 253 Interview Questions
4.2
 • 190 Interview Questions
3.4
 • 159 Interview Questions
4.2
 • 139 Interview Questions
3.9
 • 128 Interview Questions
View all
Top CGI Group Interview Questions And Answers
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