
CGI Group


CGI Group Associate Software Engineer Interview Questions and Answers for Freshers
Q1. Concatenate the Largest Digit Problem
You are given three non-zero numbers 'A', 'B', and 'C'. Your task is to determine the number created by concatenating the largest digit found in each number, in the sequenc...read more
Concatenate the largest digit from three numbers to form a new number.
Find the largest digit in each number 'A', 'B', and 'C'.
Concatenate the largest digits in the order 'A', 'B', and 'C' to form the new number.
Return the final concatenated number as the output.
Retrieve the second highest salary from a database table
Use a SQL query with ORDER BY and LIMIT to retrieve the second highest salary
Example: SELECT salary FROM employees ORDER BY salary DESC LIMIT 1, 1
Q3. 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
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.
Q4. sql query for seleting a particular column from a table and give the employer count
Use SQL query to select a particular column from a table and get the count of entries.
Use SELECT statement to specify the column you want to retrieve.
Use COUNT() function to get the count of entries in that column.
Combine both in a single query to achieve the desired result.
Q5. What is encapsulation in Java?
Encapsulation is a mechanism in Java that binds data and methods together, hiding the internal details of an object.
Encapsulation helps in achieving data hiding and abstraction.
It allows the object to control its own state and behavior.
Data members are made private and accessed through public methods (getters and setters).
Encapsulation provides better maintainability, flexibility, and security.
Example: Class with private variables and public methods to access and modify them.
Q6. What is inheritence inJava?
Inheritance in Java allows a class to inherit properties and methods from another class.
Inheritance is a fundamental concept in object-oriented programming.
It promotes code reusability and allows for the creation of hierarchical relationships between classes.
The class that is being inherited from is called the superclass or parent class, while the class that inherits is called the subclass or child class.
The subclass can access the public and protected members of the supercla...read more
Q7. what is inheritance
Inheritance is a concept in object-oriented programming where a class inherits attributes and methods from another class.
Allows a class to inherit properties and behaviors from another class
Promotes code reusability and reduces redundancy
Derived class can add its own unique attributes and methods
Example: Class 'Car' can inherit from class 'Vehicle' and gain attributes like 'color' and methods like 'drive'
Q8. code reverse a string
Reverse a string using array manipulation
Create an array of characters from the input string
Iterate through the array in reverse order and append each character to a new string
Return the reversed string
Q9. code in inheritance
Inheritance in object-oriented programming allows a class to inherit properties and behaviors from another class.
Inheritance allows for code reusability and promotes a hierarchical structure in classes.
Subclasses can access and modify the properties and methods of their parent class.
Example: class Animal { ... } class Dog extends Animal { ... }
Example: class Shape { ... } class Circle extends Shape { ... }
More about working at CGI Group







Top HR Questions asked in CGI Group Associate Software Engineer for Freshers
Interview Process at CGI Group Associate Software Engineer for Freshers

Top Associate Software Engineer Interview Questions from Similar Companies








Reviews
Interviews
Salaries
Users/Month

