Add office photos
Engaged Employer

CGI Group

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

60+ Das cnc Products Interview Questions and Answers

Updated 31 Dec 2024
Popular Designations

Q1. Frog Jump Problem Statement

A frog is positioned on the first step of a staircase consisting of N steps. The goal is for the frog to reach the final step, i.e., the Nth step. The height of each step is provided...read more

Ans.

Calculate the minimal energy required for a frog to travel from the first step to the last step of a staircase.

  • Iterate through the staircase steps and calculate the energy cost for each jump.

  • Keep track of the minimum energy cost to reach each step.

  • Consider jumping either one step or two steps ahead to minimize energy cost.

  • Return the total minimal energy cost to reach the last step.

Add your answer

Q2. Anagram Pairs Verification Problem

Your task is to determine if two given strings are anagrams of each other. Two strings are considered anagrams if you can rearrange the letters of one string to form the other...read more

Ans.

Determine if two strings are anagrams of each other by checking if they have the same characters in different order.

  • Create a frequency map of characters for both strings and compare them.

  • Sort both strings and compare if they are equal.

  • Use a dictionary to count the occurrences of each character in both strings and compare the dictionaries.

Add your answer

Q3. Palindromic Substrings Problem Statement

You are given a string 'STR'. Your task is to determine the total number of palindromic substrings present in 'STR'.

Example:

Input:
"abbc"
Output:
5
Explanation:

The pa...read more

Ans.

Count the total number of palindromic substrings in a given string.

  • Iterate through each character in the string and expand around it to find palindromic substrings.

  • Use dynamic programming to store the results of subproblems to avoid redundant calculations.

  • Consider both odd-length and even-length palindromes while counting.

  • Example: For input 'abbc', the palindromic substrings are ['a', 'b', 'b', 'c', 'bb'], totaling 5.

Add your answer

Q4. Power Set Generation

Given a sorted array of 'N' integers, your task is to generate the power set for this array. Each subset of this power set should be individually sorted.

A power set of a set 'ARR' is the s...read more

Ans.

Generate power set of a sorted array of integers with individually sorted subsets.

  • Iterate through all possible combinations using bitwise operations.

  • Sort each subset before adding it to the power set.

  • Handle empty subset separately.

Add your answer
Discover Das cnc Products interview dos and don'ts from real experiences

Q5. Pythagorean Triplets Detection

Determine if an array contains a Pythagorean triplet by checking whether there are three integers x, y, and z such that x2 + y2 = z2 within the array.

Input:

The first line contai...read more
Ans.

Detect if an array contains a Pythagorean triplet by checking if there are three integers x, y, and z such that x^2 + y^2 = z^2.

  • Iterate through all possible combinations of three integers in the array and check if x^2 + y^2 = z^2.

  • Use a nested loop to generate all possible combinations efficiently.

  • If a Pythagorean triplet is found, output 'yes', otherwise output 'no'.

Add your answer

Q6. Intersection of Linked List Problem

You are provided with two singly linked lists containing integers, where both lists converge at some node belonging to a third linked list.

Your task is to determine the data...read more

Ans.

Find the node where two linked lists merge, return -1 if no merging occurs.

  • Traverse both lists to find the lengths and the last nodes

  • Align the starting points of the lists by adjusting the pointers

  • Traverse again to find the merging point

Add your answer
Are these interview questions helpful?

Q7. Remove Vowels from a String

Given a string STR of length N, your task is to remove all the vowels from that string and return the modified string.

Input:

The first line of input contains an integer 'T' represen...read more
Ans.

Remove all vowels from a given string and return the modified string.

  • Iterate through each character in the string and check if it is a vowel (a, e, i, o, u or A, E, I, O, U).

  • If the character is not a vowel, add it to the modified string.

  • Return the modified string after processing all characters.

Add your answer

Q8. Find All Pairs Adding Up to Target

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 the Target.

Input:

The first line conta...read more
Ans.

Given an array of integers and a target value, find all pairs of elements that add up to the target.

  • Iterate through the array and for each element, check if the target minus the element exists in a hash set.

  • If it exists, add the pair to the result. If not, add the element to the hash set.

  • Handle cases where the same element is used twice in a pair.

  • Return (-1, -1) if no pair is found.

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

Q9. Preorder Traversal of a BST Problem Statement

Given an array PREORDER representing the preorder traversal of a Binary Search Tree (BST) with N nodes, construct the original BST.

Each element in the given array ...read more

Ans.

Given a preorder traversal of a BST, construct the BST and return its inorder traversal.

  • Create a binary search tree from the preorder traversal array

  • Return the inorder traversal of the constructed BST

  • Ensure each element in the array is distinct

Add your answer

Q10. Spiral Matrix Path Problem Statement

Given a N x M matrix of integers, print the spiral order of the matrix.

Input:

The input starts with an integer 'T' representing the number of test cases. Each test case con...read more

Ans.

The problem involves printing the spiral order of a given N x M matrix of integers.

  • Iterate through the matrix in a spiral order by keeping track of the boundaries.

  • Print the elements in the order of top row, right column, bottom row, and left column.

  • Continue this process until all elements are printed in the spiral order.

Add your answer

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

Ans.

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.

Add your answer
Q12. How can you print numbers from 1 to 100 using more than two threads in an optimized approach?
Ans.

Use multiple threads to print numbers from 1 to 100 in an optimized approach.

  • Divide the range of numbers (1-100) among the threads for parallel processing.

  • Use synchronization mechanisms like mutex or semaphore to ensure proper order of printing.

  • Implement a loop in each thread to print their assigned numbers.

  • Example: Thread 1 prints 1-25, Thread 2 prints 26-50, and so on.

  • Ensure proper termination of threads after printing all numbers.

Add your answer
Q13. How many types of memory areas are allocated by the JVM?
Ans.

The JVM allocates 5 types of memory areas: Method Area, Heap, Stack, PC Register, and Native Method Stack.

  • Method Area stores class structures, method data, and runtime constant pool.

  • Heap is where objects are allocated and memory for instance variables is stored.

  • Stack stores local variables and partial results, and plays a role in method invocation and return.

  • PC Register holds the address of the JVM instruction currently being executed.

  • Native Method Stack contains native metho...read more

Add your answer
Q14. What is the main difference between UNION and UNION ALL?
Ans.

UNION combines result sets from two or more SELECT statements, while UNION ALL includes all rows, including duplicates.

  • UNION removes duplicate rows, while UNION ALL does not

  • UNION is slower than UNION ALL as it performs a distinct operation

  • UNION requires the same number of columns in the SELECT statements being combined

Add your answer
Q15. What is the difference between Python arrays and lists?
Ans.

Python arrays are a module in Python that allows you to create arrays of a specific data type, while lists are a built-in data structure that can hold elements of different data types.

  • Arrays in Python are created using the 'array' module and can only store elements of the same data type, while lists can store elements of different data types.

  • Arrays are more memory efficient compared to lists as they store data in a contiguous block of memory.

  • Lists have more built-in functions...read more

Add your answer
Q16. How can you retrieve the second highest salary from a database table?
Ans.

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

Add your answer
Q17. What is the difference between a process and a program?
Ans.

A program is a set of instructions to perform a specific task, while a process is an instance of a program in execution.

  • Program is a static entity stored on disk, while process is a dynamic entity in memory.

  • Program is passive, while process is active and can interact with other processes.

  • Multiple processes can run the same program simultaneously.

  • Example: Notepad.exe is a program, while when you open Notepad, it becomes a process.

Add your answer
Q18. What is pickling and unpickling in Python?
Ans.

Pickling is the process of serializing an object into a byte stream, while unpickling is the process of deserializing the byte stream back into an object in Python.

  • Pickling is used to store Python objects in a file or transfer data over a network.

  • Unpickling is used to retrieve the original Python objects from the stored byte stream.

  • The 'pickle' module in Python is used for pickling and unpickling objects.

  • Example: Pickling a dictionary - pickle.dump(data, file)

  • Example: Unpickl...read more

Add your answer

Q19. 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
Q20. What is the difference between a process and a thread?
Ans.

A process is an instance of a program running on a computer, while a thread is a smaller unit of a process that can execute independently.

  • A process has its own memory space, while threads share the same memory space within a process.

  • Processes are heavyweight, requiring separate memory and resources, while threads are lightweight and share resources.

  • Processes communicate with each other through inter-process communication mechanisms, while threads can communicate directly with...read more

Add your answer

Q21. 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
Q22. What is the use of 'self' in Python?
Ans.

The 'self' keyword in Python is used to refer to the instance of the class itself.

  • Used to access variables and methods within a class

  • Must be the first parameter in a class method definition

  • Helps differentiate between instance variables and local variables

  • Example: class MyClass: def __init__(self, x): self.x = x

  • Example: class MyClass: def display(self): print(self.x)

Add your answer
Q23. What is the __init__ method in Python?
Ans.

The __init__ method is a special method in Python classes used to initialize new objects.

  • The __init__ method is called when a new instance of a class is created.

  • It is used to initialize the attributes of the object.

  • Example: class MyClass: def __init__(self, x): self.x = x obj = MyClass(5)

Add your answer
Q24. How does inheritance work in Python?
Ans.

Inheritance in Python allows a class to inherit attributes and methods from another class.

  • Inheritance is achieved by creating a new class that derives from an existing class.

  • The new class (subclass) can access the attributes and methods of the existing class (superclass).

  • Subclasses can also override or extend the functionality of the superclass.

  • Example: class Dog(Animal) - Dog inherits attributes and methods from Animal class.

Add your answer

Q25. What is the Java code for various types of sorting algorithms?

Ans.

Various sorting algorithms in Java code

  • Bubble Sort: int[] arr = {5, 2, 8, 1, 3}; Arrays.sort(arr);

  • Selection Sort: int[] arr = {5, 2, 8, 1, 3}; Arrays.sort(arr);

  • Insertion Sort: int[] arr = {5, 2, 8, 1, 3}; Arrays.sort(arr);

  • Merge Sort: int[] arr = {5, 2, 8, 1, 3}; Arrays.sort(arr);

  • Quick Sort: int[] arr = {5, 2, 8, 1, 3}; Arrays.sort(arr);

Add your answer

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

Ans.

To create a web page using HTML and CSS, you need to write the structure and content in HTML and then style it using CSS.

  • Start by creating the basic structure of the web page using HTML tags such as <html>, <head>, <title>, <body>, <header>, <footer>, <nav>, <section>, <article>, <div>, etc.

  • Add content to the web page using text, images, links, and other elements within the HTML tags.

  • Use CSS to style the web page by selecting elements with selectors and applying styles such a...read more

Add your answer

Q27. 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
Ans.

CGI is a leading global IT and business consulting services firm.

  • CGI has a strong reputation in the industry for delivering high-quality software solutions.

  • CGI offers a wide range of opportunities for career growth and development.

  • CGI has a global presence, allowing for exposure to diverse projects and clients.

  • CGI values innovation and encourages employees to think creatively.

  • CGI provides a supportive and collaborative work environment.

View 1 answer

Q29. How to write excute parameters in function

Ans.

Execute parameters in a function must be an array of strings.

  • Define the function with parameters in the parentheses

  • Separate each parameter with a comma

  • Enclose the parameters in square brackets to create an array

  • Example: function myFunction([param1, param2, param3]) { //code here }

Add your answer

Q30. sql query for seleting a particular column from a table and give the employer count

Ans.

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.

Add your answer

Q31. Why we use class explain with example

Ans.

Classes are used in object-oriented programming to define a blueprint for creating objects.

  • Classes provide encapsulation, inheritance, and polymorphism.

  • They help organize code and make it more reusable.

  • Example: class Car { String make; int year; }

  • Example: Car myCar = new Car(); myCar.make = "Toyota"; myCar.year = 2021;

Add your answer

Q32. Why python is a dynamic language

Ans.

Python is a dynamic language because it allows for runtime changes and doesn't require variable declarations.

  • Python doesn't require variable declarations, allowing for dynamic typing

  • Functions and classes can be modified at runtime

  • Python's built-in functions like type() and setattr() allow for dynamic behavior

  • Dynamic behavior allows for more flexibility and faster development

  • Example: changing the type of a variable during runtime

Add your answer

Q33. How to convert dictionary into list

Ans.

Convert dictionary to list in Python

  • Use the items() method to get key-value pairs as tuples

  • Convert the tuples to a list using list()

  • Append the lists to a new list using append()

  • Alternatively, use list comprehension to convert the dictionary to a list

Add your answer

Q34. Write sql query to display the avg salary of each dept.

Ans.

SQL query to display average salary of each department

  • Use GROUP BY clause to group the results by department

  • Use AVG() function to calculate the average salary

  • Join the tables if necessary to get department information

Add your answer

Q35. Write a python program to print every number as even and odd from 0 to 100.

Ans.

Python program to print numbers from 0 to 100 as even and odd.

  • Use a for loop to iterate from 0 to 100.

  • Check if the number is even or odd using the modulo operator.

  • Print the number along with 'Even' or 'Odd' accordingly.

Add your answer

Q36. Programme on file handling?

Ans.

A program on file handling is a software that allows users to create, read, update, and delete files on a computer system.

  • File handling involves operations such as opening, closing, reading, writing, and deleting files.

  • File handling can be done using various programming languages such as C, C++, Java, Python, etc.

  • Examples of file handling operations include creating a new file, reading data from a file, writing data to a file, and deleting a file.

  • File handling also includes c...read more

Add your answer

Q37. What is run time polymorphism ?

Ans.

Run time polymorphism is the ability of a function to behave differently based on the object it is called with.

  • Run time polymorphism is achieved through method overriding in object-oriented programming.

  • It allows a subclass to provide a specific implementation of a method that is already provided by its parent class.

  • The actual method that gets called is determined at runtime based on the type of object.

  • Example: Inheritance in Java allows for run time polymorphism when a method...read more

Add your answer

Q38. Write even and odd number code

Ans.

Code to print even and odd numbers

  • Use a loop to iterate through numbers

  • Check if the number is even or odd using modulus operator

  • Print the number accordingly

Add your answer

Q39. Oops concept examples?

Ans.

Examples of OOP concepts include inheritance, polymorphism, and encapsulation.

  • Inheritance: A child class inherits properties and methods from a parent class.

  • Polymorphism: Objects of different classes can be treated as objects of a common superclass.

  • Encapsulation: Data and methods are bundled together in a class, hiding internal details.

Add your answer

Q40. Different SQL queries?

Ans.

Different SQL queries are used to retrieve, manipulate, and manage data in a relational database.

  • SELECT query: retrieves data from one or more tables

  • INSERT query: inserts new data into a table

  • UPDATE query: modifies existing data in a table

  • DELETE query: removes data from a table

  • JOIN query: combines data from multiple tables based on a related column

  • GROUP BY query: groups data based on a specific column

  • ORDER BY query: sorts data based on a specific column

  • COUNT query: counts the...read more

Add your answer

Q41. What is anonymous function

Ans.

An anonymous function is a function without a name.

  • Anonymous functions are often used as arguments to higher-order functions.

  • They can be defined using the function keyword or as arrow functions.

  • Example: const add = function(x, y) { return x + y; }

  • Example: const multiply = (x, y) => x * y;

Add your answer

Q42. What is inheritance method

Ans.

Inheritance is a mechanism in object-oriented programming where a class is derived from another class.

  • Inheritance allows a subclass to inherit properties and methods from a superclass.

  • The subclass can also add its own properties and methods.

  • Inheritance promotes code reuse and helps in creating a hierarchical class structure.

  • For example, a Car class can inherit from a Vehicle class, which can inherit from a Transport class.

  • The Car class will have access to all the properties a...read more

Add your answer

Q43. What is data structures

Ans.

Data structures are ways of organizing and storing data in a computer so that it can be accessed and used efficiently.

  • Data structures are used to manage and manipulate data in computer programs.

  • Examples of data structures include arrays, linked lists, stacks, queues, trees, and graphs.

  • Choosing the right data structure for a particular problem can greatly improve the efficiency of a program.

  • Data structures can be implemented in various programming languages such as C, C++, Jav...read more

Add your answer

Q44. Difference between list and tuple

Ans.

List is mutable while tuple is immutable in Python.

  • List can be modified while tuple cannot be modified.

  • List uses square brackets [] while tuple uses parentheses ().

  • List is slower than tuple in terms of performance.

  • List is used for collections of data while tuple is used for grouping related data.

  • Example of list: [1, 2, 3] and example of tuple: (1, 2, 3).

Add your answer

Q45. Explain about homogeneous elements

Ans.

Homogeneous elements are elements of the same type or kind.

  • Homogeneous elements have similar properties and characteristics.

  • They can be combined or compared easily.

  • Examples include a set of integers, a group of apples, or a collection of red flowers.

Add your answer

Q46. What is an array

Ans.

An array is a collection of similar data types stored in contiguous memory locations.

  • Arrays can be of any data type, such as integers, floats, characters, etc.

  • Arrays are accessed using an index, starting from 0.

  • Arrays can be one-dimensional, two-dimensional, or multi-dimensional.

  • Example: string[] names = {"John", "Jane", "Bob"};

  • Example: int[] numbers = new int[5];

Add your answer

Q47. Find minimum positive value in array.

Ans.

Find minimum positive value in array of strings.

  • Convert array elements to integers

  • Filter out negative values

  • Find minimum positive value

Add your answer

Q48. Java code of string manipulation

Ans.

String manipulation in Java involves various methods like substring, concat, replace, etc.

  • Use substring() to extract a part of the string

  • Use concat() to concatenate two strings

  • Use replace() to replace a specific character or substring in a string

Add your answer

Q49. What is bootstrap

Ans.

Bootstrap is a popular front-end framework for building responsive websites and web applications.

  • Bootstrap provides pre-designed HTML, CSS, and JavaScript components for easy implementation

  • It includes a responsive grid system for creating layouts that adapt to different screen sizes

  • Bootstrap also offers built-in support for popular JavaScript plugins and libraries

  • It was originally developed by Twitter and is now maintained by the open-source community

  • Bootstrap is widely used ...read more

Add your answer

Q50. What are Oops concept ?

Ans.

Oops concepts are the principles of Object Oriented Programming, including Inheritance, Encapsulation, Polymorphism, and Abstraction.

  • Inheritance: Allows a class to inherit properties and behavior from another class.

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

  • Polymorphism: Ability of a function to behave differently based on the object it is acting upon.

  • Abstraction: Hiding the complex implementation details and showing only the necessar...read more

Add your answer

Q51. What is structured query language

Ans.

Structured Query Language (SQL) is a standard language for managing and manipulating databases.

  • SQL is used to communicate with databases to perform tasks such as querying data, updating records, and creating tables.

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

  • SQL is not case-sensitive, but conventionally written in uppercase for keywords and lowercase for table and column names.

Add your answer

Q52. Explain about Oops concept

Ans.

OOPs is a programming paradigm based on the concept of objects that interact with each other.

  • OOPs stands for Object-Oriented Programming.

  • It focuses on creating objects that have properties and methods.

  • Encapsulation, Inheritance, and Polymorphism are the three main pillars of OOPs.

  • Encapsulation is the process of hiding the implementation details of an object from the outside world.

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

  • Polymorphism allo...read more

Add your answer

Q53. What is encapsulation in Java?

Ans.

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.

Add your answer

Q54. What is inheritence inJava?

Ans.

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

Add your answer

Q55. Prime number condition

Ans.

Prime number is a number that is divisible only by 1 and itself.

  • Prime numbers are always greater than 1.

  • Examples of prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97.

  • To check if a number is prime, divide it by all numbers less than or equal to its square root. If none of them divide it evenly, it is prime.

Add your answer

Q56. Explain oops concepts.

Ans.

OOPs concepts are the principles of Object-Oriented Programming that focus on encapsulation, inheritance, polymorphism, and abstraction.

  • Encapsulation: bundling of data and methods that operate on that data within a single unit

  • Inheritance: ability of a class to inherit properties and characteristics from a parent class

  • Polymorphism: ability of objects to take on multiple forms or behaviors

  • Abstraction: hiding of complex implementation details and providing a simplified interface...read more

Add your answer

Q57. what is inheritance

Ans.

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'

Add your answer

Q58. Write fibanoci code

Ans.

Fibonacci code generates a series of numbers where each number is the sum of the two preceding ones.

  • Declare variables for first and second numbers in the series

  • Loop through the desired number of iterations

  • Calculate the next number in the series by adding the previous two

  • Print or store the result

Add your answer

Q59. Features of python

Ans.

Python is a high-level, interpreted programming language known for its simplicity, readability, and versatility.

  • Python has a large standard library with modules for various tasks

  • It supports multiple programming paradigms such as procedural, object-oriented, and functional programming

  • Python is dynamically typed and garbage-collected

  • It has a simple and easy-to-learn syntax

  • Python is widely used in web development, scientific computing, data analysis, artificial intelligence, and...read more

Add your answer

Q60. code reverse a string

Ans.

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

Add your answer

Q61. code in inheritance

Ans.

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 { ... }

Add your answer

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 Das cnc Products

based on 26 interviews
5 Interview rounds
Technical Round - 1
Technical Round - 2
HR Round - 1
HR Round - 2
Personal Interview1 Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Associate Software Engineer Interview Questions from Similar Companies

3.8
 • 157 Interview Questions
3.7
 • 60 Interview Questions
3.7
 • 60 Interview Questions
3.3
 • 17 Interview Questions
3.8
 • 13 Interview Questions
3.1
 • 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

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