Mercedes-Benz Research and Development India
Samsung Interview Questions and Answers
Q1. What is Os? What is primary key? Basics of os , dbms and python.
Answering questions on OS, DBMS, and Python for Graduate Engineer Trainee (GET) interview.
OS stands for Operating System, it manages computer hardware and software resources.
DBMS stands for Database Management System, it is used to manage and organize data in a database.
Python is a high-level programming language used for web development, data analysis, and artificial intelligence.
Primary key is a unique identifier for each record in a database table.
Basics of OS include proc...read more
Q2. Swap two number without 3rd variable
Swapping two numbers without using a third variable.
Use arithmetic operations to swap the numbers
Addition and subtraction can be used
XOR operation can also be used
Q3. Different types of OS and there uses. Difference between python and cpp.
Different types of OS and their uses. Difference between Python and C++.
Operating systems include Windows, macOS, Linux, iOS, Android, etc.
Windows is commonly used for personal computers, while Linux is popular for servers.
Python is an interpreted language, while C++ is a compiled language.
Python is easier to learn and write code quickly, while C++ is faster and more efficient.
Python is commonly used for web development, data analysis, and artificial intelligence, while C++ i...read more
Q4. What is primary key and foreign key?
Primary key uniquely identifies a record in a table, while foreign key refers to a field in another table.
Primary key is used to enforce data integrity and ensure uniqueness of records.
Foreign key is used to establish a relationship between two tables.
A table can have only one primary key, but multiple foreign keys.
Example: In a database of students and courses, the student ID can be the primary key in the student table and a foreign key in the course table.
Q5. Explain the Pillars of OOPS.
The pillars of OOPS are encapsulation, inheritance, and polymorphism.
Encapsulation: It is the process of hiding the internal details of an object and providing a public interface for interacting with it.
Inheritance: It allows a class to inherit properties and behaviors from another class, enabling code reuse and creating a hierarchical relationship.
Polymorphism: It allows objects of different classes to be treated as objects of a common superclass, providing flexibility and e...read more
Q6. What are inline functions?
Inline functions are functions defined with the 'inline' keyword, which instructs the compiler to insert the function's code directly where it is called.
Inline functions are typically used for small, frequently called functions to reduce the overhead of function calls.
They can improve performance by eliminating the function call overhead.
Inline functions are expanded by the compiler at the place where they are called, rather than being executed as a separate function.
Example:...read more
Q7. How pointers work in C++?
Pointers in C++ are variables that store memory addresses of other variables or functions.
Pointers are declared using an asterisk (*) before the variable name.
Pointers can be used to access and manipulate the value stored at a particular memory address.
Example: int *ptr; // declaring a pointer to an integer variable
Q8. What is a dangling pointer?
A dangling pointer is a pointer that points to a memory location that has been deallocated, leading to undefined behavior if accessed.
Dangling pointers can occur when memory is freed but the pointer is not set to NULL.
Accessing a dangling pointer can result in crashes or unexpected behavior.
Example: int *ptr = new int; delete ptr; // ptr is now a dangling pointer
Q9. What are classes and objects?
Classes are blueprints for creating objects in object-oriented programming. Objects are instances of classes with their own unique attributes and behaviors.
Classes define the properties and behaviors that objects of that class will have.
Objects are instances of classes that have their own unique values for the properties defined in the class.
Classes can inherit properties and behaviors from other classes through inheritance.
Objects can interact with each other by sending mess...read more
Top Graduate Engineer Trainee (Get) Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month