Add office photos
Engaged Employer

LTIMindtree

3.8
based on 21k Reviews
Filter interviews by

40+ Allegion Interview Questions and Answers

Updated 20 Dec 2024
Popular Designations

Q1. Your introduction? What are oops concept? What is inheritance? What is difference between c and c++? Write a code to print sum of all prime no. Between 1to100? What is primary key and foreign key? Difference be...

read more
Ans.

Answers to questions asked in a Graduate Engineer Trainee interview

  • OOPs concepts include encapsulation, inheritance, polymorphism, and abstraction

  • Inheritance is a mechanism where a new class is derived from an existing class

  • C++ is an object-oriented programming language while C is a procedural programming language

  • Code to print sum of prime numbers between 1 to 100: [code snippet]

  • Primary key is a unique identifier for a record in a table while foreign key is a field in a table...read more

Add your answer

Q2. Reverse the String Problem Statement

You are given a string STR which contains alphabets, numbers, and special characters. Your task is to reverse the string.

Example:

Input:
STR = "abcde"
Output:
"edcba"

Input...read more

Ans.

Reverse a given string containing alphabets, numbers, and special characters.

  • Iterate through the string from the end to the beginning and append each character to a new string.

  • Use built-in functions like reverse() or slicing to reverse the string.

  • Handle special characters and numbers while reversing the string.

  • Ensure to consider the constraints provided in the problem statement.

  • Implement a function that takes a string as input and returns the reversed string.

Add your answer

Q3. Prime Numbers Identification

Given a positive integer N, your task is to identify all prime numbers less than or equal to N.

Explanation:

A prime number is a natural number greater than 1 that has no positive d...read more

Ans.

Identify all prime numbers less than or equal to a given positive integer N.

  • Iterate from 2 to N and check if each number is prime

  • Use the Sieve of Eratosthenes algorithm for better efficiency

  • Optimize by only checking up to the square root of N for divisors

Add your answer

Q4. Can we write int func() and int func(int a) in a single class?

Ans.

Yes, we can write int func() and int func(int a) in a single class.

  • We can overload the function with different parameters.

  • The function with no parameter is called default constructor.

  • Example: class MyClass { int func(); int func(int a); };

  • Both functions can have different implementations.

Add your answer
Discover Allegion interview dos and don'ts from real experiences
Q5. Is it allowed in C++ to have two functions with the same name?
Ans.

Yes, it is allowed in C++ to have two functions with the same name as long as they have different parameters.

  • Function overloading in C++ allows multiple functions with the same name but different parameters.

  • The compiler distinguishes between the functions based on the number or types of parameters.

  • Example: void display(int x) and void display(float y) can coexist in C++.

Add your answer

Q6. How to insert a java code in (html tags) 9

Ans.

You can insert Java code in HTML tags using the <script> tag.

  • Use the <script> tag to insert Java code within HTML tags.

  • Make sure to properly close the <script> tag.

  • Example: <script>System.out.println('Hello, World!');</script>

Add your answer
Are these interview questions helpful?

Q7. How did you implement (a particular feature) in reactjs.

Ans.

I implemented (a particular feature) in ReactJS using (specific method/technique).

  • Identified the specific feature requirements

  • Researched and selected the appropriate ReactJS library or tool

  • Implemented the feature using ReactJS components and state management

  • Tested and debugged the feature for optimal performance

  • Integrated the feature with the rest of the application

  • Continuously monitored and improved the feature as needed

Add your answer

Q8. structure of an html file or DOM structure use of meta tag what are hooks in react how to import index.css in index.js router in react where is styling done and some other basic web dev questions

Ans.

Basic web development questions covering HTML structure, meta tags, React hooks, CSS import, and routing.

  • HTML file structure includes <html>, <head>, and <body> tags

  • Meta tags provide metadata about the HTML document

  • React hooks are functions that let you use state and other React features in functional components

  • To import index.css in index.js, use 'import './index.css';' at the top of the index.js file

  • React Router is a standard library for routing in React applications

  • Styling...read more

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

Q9. Write a program to display prime numbers from 1-35

Ans.

Program to display prime numbers from 1-35

  • Loop through numbers 1-35

  • Check if each number is prime

  • If prime, display the number

Add your answer

Q10. Is method overloading possible in c++?

Ans.

Yes, method overloading is possible in C++.

  • Method overloading allows multiple functions with the same name but different parameters.

  • The compiler determines which function to call based on the number and types of arguments passed.

  • Example: void print(int x), void print(float x), void print(char x) can all be overloaded.

  • Overloading can also be done with operators like +, -, *, /, etc.

  • Overloading improves code readability and reduces code duplication.

Add your answer

Q11. BE project, what softwares you will use?

Ans.

I will use software tools that are relevant to my BE project.

  • The software tools I will use will depend on the nature of my BE project.

  • For example, if my project involves designing a circuit, I may use software like LTSpice or Proteus.

  • If my project involves programming, I may use software like Visual Studio or Eclipse.

  • I will also use software for data analysis and visualization, such as MATLAB or Python.

  • Ultimately, I will choose software tools that will help me achieve the goa...read more

Add your answer

Q12. Write a program to find the largest and second largest number in an array

Ans.

Program to find largest and second largest number in an array

  • Iterate through array and compare each element to current largest and second largest

  • Update variables accordingly

  • Return largest and second largest

Add your answer
Q13. Write an SQL query to find all the students with marks greater than the average marks.
Ans.

SQL query to find students with marks greater than average marks

  • Calculate the average marks first

  • Use a subquery to compare each student's marks with the average marks

  • Select students where marks are greater than the average

Add your answer

Q14. What are different types of data structures?

Ans.

Data structures are ways to organize and store data in a computer program.

  • Some common data structures include arrays, linked lists, stacks, queues, trees, and graphs.

  • Arrays are a collection of elements of the same data type, accessed by an index.

  • Linked lists are a sequence of nodes, each containing data and a reference to the next node.

  • Stacks are a last-in, first-out (LIFO) data structure, where elements are added and removed from the top.

  • Queues are a first-in, first-out (FIF...read more

Add your answer

Q15. what is linked list difference between calloc and malloc

Ans.

A linked list is a data structure that consists of a sequence of nodes, each containing a reference to the next node.

  • Linked lists are useful for dynamic data structures where the size of the data can change during runtime.

  • They can be singly linked or doubly linked.

  • Traversal of a linked list is done by starting at the head node and following the next pointers until the end is reached.

  • C++ example: struct Node { int data; Node* next; };

  • Java example: class Node { int data; Node n...read more

Add your answer

Q16. Does schema consist more than 1 database. Example

Ans.

Yes, a schema can consist of multiple databases.

  • A schema is a logical container for database objects.

  • Multiple databases can be grouped under a single schema.

  • For example, a company may have separate databases for HR, finance, and sales, but all under the same schema.

  • This allows for easier management and organization of the databases.

Add your answer

Q17. What is polymorphism?

Ans.

Polymorphism is the ability of an object to take on many forms.

  • Polymorphism allows objects of different classes to be treated as if they are of the same class.

  • It can be achieved through method overloading or method overriding.

  • Example: A shape class can have different subclasses like circle, square, triangle, etc. and all can be treated as shapes.

  • Polymorphism helps in achieving code reusability and flexibility.

View 1 answer

Q18. what are joins what is java what is oops what is index

Ans.

Joins are used in databases to combine rows from two or more tables based on a related column between them.

  • Joins are used in SQL to retrieve data from multiple tables based on a related column.

  • Types of joins include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN.

  • Example: SELECT * FROM table1 INNER JOIN table2 ON table1.column = table2.column;

Add your answer
Q19. What is polymorphism in C++?
Ans.

Polymorphism in C++ allows objects of different classes to be treated as objects of a common superclass.

  • Polymorphism is achieved through function overloading and overriding.

  • Function overloading allows multiple functions with the same name but different parameters.

  • Function overriding involves redefining a base class function in a derived class.

  • Polymorphism enables dynamic binding and late binding.

  • Example: Animal class with virtual function 'makeSound' overridden in Dog and Cat...read more

Add your answer
Q20. Does C support function overloading?
Ans.

No, C does not support function overloading.

  • C does not support function overloading, where multiple functions can have the same name but different parameters.

  • In C, if you declare two functions with the same name, the compiler will throw an error.

  • Example: int add(int a, int b) and float add(float a, float b) cannot coexist in C.

Add your answer

Q21. Wap to reverse a string in C

Ans.

A program to reverse a string in C language.

  • Declare a character array to store the string.

  • Use a loop to read the string from the user.

  • Use another loop to reverse the string.

  • Print the reversed string.

Add your answer

Q22. Write a program to reverse a string

Ans.

A program to reverse a string

  • Create an empty string to store the reversed string

  • Loop through the original string from the end to the beginning

  • Add each character to the new string

  • Return the new string

Add your answer

Q23. What is exception handling in java

Ans.

Exception handling is a mechanism to handle runtime errors in Java programs.

  • Exceptions are objects that represent errors or exceptional conditions that occur during program execution.

  • Java provides try-catch-finally blocks to handle exceptions.

  • The try block contains the code that might throw an exception.

  • The catch block catches the exception and handles it.

  • The finally block contains code that is executed regardless of whether an exception is thrown or not.

  • Example: try { //code...read more

Add your answer

Q24. what is oops? inheritance and all.

Ans.

OOPs stands for Object-Oriented Programming. Inheritance is a feature of OOPs that allows a class to inherit properties and methods from another class.

  • OOPs is a programming paradigm that focuses on objects and their interactions.

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

  • There are different types of inheritance, such as single, multiple, and hierarchical inheritance.

  • Inheritance promotes code reusability and reduces code...read more

Add your answer

Q25. explain oops concepts Difference between list and tuple

Ans.

OOPs concepts include inheritance, polymorphism, encapsulation, and abstraction. List is mutable while tuple is immutable.

  • OOPs concepts: inheritance, polymorphism, encapsulation, abstraction

  • List: mutable, can be modified after creation (e.g. [1, 2, 3])

  • Tuple: immutable, cannot be modified after creation (e.g. (1, 2, 3))

Add your answer

Q26. what is challenges faced in project

Ans.

Challenges faced in a project include tight deadlines, budget constraints, communication issues, scope changes, and resource allocation.

  • Tight deadlines can lead to rushed work and potential errors.

  • Budget constraints may limit the resources available for the project.

  • Communication issues can result in misunderstandings and delays.

  • Scope changes can disrupt the project plan and require adjustments.

  • Resource allocation challenges may arise when resources are not properly distribute...read more

Add your answer

Q27. Give an example of stack in real life

Ans.

A stack is a data structure where elements are added and removed from the top only.

  • A stack of plates in a buffet where the top plate is the only one accessible

  • A browser's back button where the previous pages are stored in a stack

  • A stack of books where the top book is the one you can read

  • A stack of trays in a cafeteria where the top tray is the only one you can take

  • A stack of pancakes where the top pancake is the one you eat first

Add your answer

Q28. Program to implement factorial of a number

Ans.

Program to calculate factorial of a number using recursion or iteration

  • Define a function to calculate factorial

  • Use recursion or iteration to calculate factorial

  • Handle edge cases like 0 and negative numbers

  • Example: factorial of 5 is 5*4*3*2*1 = 120

Add your answer

Q29. What is a class?

Ans.

A class is a blueprint for creating objects that have similar attributes and behaviors.

  • A class is a user-defined data type that encapsulates data and functions.

  • It provides a way to organize and structure code.

  • Objects are instances of a class.

  • Classes can inherit properties and methods from other classes.

  • Example: A class 'Car' can have attributes like 'color', 'model', and methods like 'start', 'stop'.

Add your answer

Q30. difference between structure and classes

Ans.

Structures are used for storing data while classes are used for storing data and methods.

  • Structures are value types while classes are reference types.

  • Structures do not support inheritance while classes do.

  • Structures are used for simple data types while classes are used for complex data types.

  • Example of structure: struct Employee { int id; string name; }

  • Example of class: class Car { string make; string model; void start() { //code to start the car } }

View 1 answer

Q31. what is ddl, dcl, tcl?

Ans.

DDL, DCL, and TCL are SQL commands used to manage database objects and transactions.

  • DDL (Data Definition Language) is used to create, modify, and delete database objects like tables, indexes, and views.

  • DCL (Data Control Language) is used to control access to the database by granting or revoking privileges to users.

  • TCL (Transaction Control Language) is used to manage transactions by committing or rolling back changes made to the database.

  • Examples of DDL commands include CREATE...read more

Add your answer

Q32. what is callender type que

Ans.

A calender type queue is a data structure that stores elements in a circular buffer, allowing for efficient insertion and removal operations.

  • Elements are stored in a circular buffer, with a front and rear pointer indicating the start and end of the queue.

  • When the rear pointer reaches the end of the buffer, it wraps around to the beginning, creating a circular structure.

  • Insertion and removal operations are efficient as they only involve updating the front and rear pointers.

  • Exa...read more

Add your answer
Ans.

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

  • Common commands include SELECT, INSERT, UPDATE, and DELETE

  • Examples of database management systems that use SQL include MySQL, Oracle, and Microsoft SQL Server

Add your answer

Q34. What is schema

Ans.

Schema is a blueprint or structure that defines the organization of data in a database.

  • Schema is used to define the structure of a database.

  • It includes information about tables, columns, data types, relationships, and constraints.

  • It helps ensure data consistency and integrity.

  • Examples of schema include SQL Server, Oracle, and MySQL.

  • Schema can also refer to the organization of data in XML or JSON documents.

Add your answer

Q35. Features of OOPS

Ans.

OOPS is a programming paradigm that focuses on objects and their interactions.

  • Encapsulation: bundling of data and methods that operate on that data

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

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

  • Abstraction: hiding of complex implementation details from the user

  • Examples: Java, C++, Python

Add your answer

Q36. Code to swap to numbers

Ans.

Code to swap two numbers

  • Declare two variables and assign values to them

  • Use a third variable to store the value of the first variable

  • Assign the value of the second variable to the first variable

  • Assign the value of the third variable to the second variable

Add your answer

Q37. What are String Tokenizers

Ans.

String tokenizers are tools used to break a string into smaller parts based on a specified delimiter.

  • String tokenizers are commonly used in programming to parse strings and extract relevant information.

  • They can be used to split a sentence into individual words, or to extract specific data from a structured text.

  • For example, in Java, the StringTokenizer class can be used to break a string into tokens based on a specified delimiter.

Add your answer

Q38. what is struct and unions

Ans.

Structs and unions are data structures in C programming used to group different data types under a single name.

  • Structs allow you to group different data types together under a single name. For example, a struct 'Person' can have fields like name, age, and gender.

  • Unions are similar to structs but they share the same memory location for all its members. Only one member can contain a value at a time. For example, a union 'Data' can have fields like int, float, and char, but only...read more

Add your answer

Q39. Acid properties in dbms

Ans.

Acid properties in DBMS refer to the properties that ensure data consistency and reliability.

  • ACID stands for Atomicity, Consistency, Isolation, and Durability.

  • Atomicity ensures that a transaction is treated as a single, indivisible unit of work.

  • Consistency ensures that the database remains in a valid state before and after a transaction.

  • Isolation ensures that concurrent transactions do not interfere with each other.

  • Durability ensures that once a transaction is committed, it w...read more

View 1 answer

Q40. Prime numbers in a range

Ans.

Finding prime numbers within a given range.

  • A prime number is a number that is only divisible by 1 and itself.

  • Start with the first number in the range and check if it is prime.

  • If it is prime, add it to the list of prime numbers.

  • If it is not prime, move on to the next number.

  • Repeat until all numbers in the range have been checked.

  • Examples: Prime numbers between 1 and 10 are 2, 3, 5, and 7.

  • Examples: Prime numbers between 20 and 30 are 23 and 29.

Add your answer

Q41. Tell about java

Ans.

Java is a high-level, object-oriented programming language used for developing applications and software.

  • Java is platform-independent and can run on any operating system.

  • It is used for developing web applications, mobile applications, and enterprise software.

  • Java is known for its security features and is widely used in the financial industry.

  • It has a vast library of pre-built classes and functions that make coding easier and faster.

  • Java is also used for developing games and s...read more

Add your answer

Q42. what is foreign key

Ans.

Foreign key is a field in a database table that links to a primary key in another table.

  • Foreign key ensures referential integrity between related tables

  • It helps maintain consistency and prevent orphan records

  • Example: In a database of students and courses, student_id in courses table can be a foreign key referencing id in students table

Add your answer

Q43. What is sub query

Ans.

A subquery is a query within another query used to retrieve data that will be used in the main query.

  • Subqueries are enclosed in parentheses and placed within the WHERE or HAVING clause of the main query.

  • They can be used to filter, sort, or aggregate data before it is used in the main query.

  • Subqueries can be nested within other subqueries to perform more complex operations.

  • Examples of subqueries include finding the maximum or minimum value in a table, or selecting data from on...read more

Add your answer
Ans.

SDLC stands for Software Development Life Cycle.

  • It is a process used to design, develop and test software.

  • It consists of several phases such as planning, analysis, design, implementation, testing, and maintenance.

  • Each phase has its own set of activities and deliverables.

  • It ensures that the software is developed efficiently and meets the user's requirements.

  • Examples of SDLC models include Waterfall, Agile, and Spiral.

Add your answer

Q45. Oops concepts in Java

Ans.

Oops concepts in Java

  • Object-oriented programming paradigm

  • Encapsulation, Inheritance, Polymorphism, Abstraction

  • Classes, Objects, Methods, Interfaces, Packages

  • Example: Class Car with properties like make, model, year and methods like start, stop, accelerate

  • Example: Inheritance - Class SUV extends Car with additional properties like off-road capability

Add your answer

Q46. OOP in python study properly

Ans.

OOP in Python refers to the concept of using classes and objects to organize and structure code.

  • Python supports object-oriented programming (OOP) principles such as encapsulation, inheritance, and polymorphism.

  • Classes are used to define objects, which can have attributes (variables) and methods (functions).

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

  • Polymorphism enables objects to be treated as instances of their parent class or their own c...read more

Add your answer

Q47. Namespaces in python

Ans.

Namespaces in Python are a way to organize and group related code together.

  • Namespaces prevent naming conflicts and improve code readability.

  • Python uses a hierarchical namespace structure.

  • Namespaces can be created using modules, classes, and functions.

  • The 'global' and 'local' keywords are used to access variables in different namespaces.

  • Examples of namespaces in Python include built-in, global, and local namespaces.

Add your answer

Q48. what does select command do?

Ans.

SELECT command is used to retrieve data from a database table.

  • It is a SQL command.

  • It is used to retrieve data from one or more tables.

  • It can be used with various clauses like WHERE, ORDER BY, GROUP BY, etc.

  • Example: SELECT * FROM customers WHERE city='New York';

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

Interview Process at Allegion

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

Top Graduate Engineer Trainee (Get) Interview Questions from Similar Companies

4.0
 • 104 Interview Questions
4.0
 • 38 Interview Questions
3.8
 • 28 Interview Questions
3.5
 • 19 Interview Questions
4.1
 • 17 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