Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. difference between c and c++ . 2. Concept of oops , pillar of oops . 3. Abstraction, polymorphism, inheritance, encapsulation. 4. Method overloading 5. Function overloading. 6. Swap the two number without using third variable.(javascript) 7. One query of MySQL using join 8. Taking the question of frontend ES6 feature.?
- - **Difference between C and C++**:
- - C is a procedural programming language, while C++ is a multi-paradigm language with support for both procedural and object-oriented programming.
- - C++ includes features like classes, inheritance, polymorphism, and encapsulation, which are not present in C.
- - **Concept of OOPs, Pillars of OOPs**:
- - OOPs (Object-Oriented Programming) is a programming paradigm based on the concept of "objects", which can contain data and code.
- - Pillars of OOPs:
- - Abstraction: Hides the complex implementation details and only shows the necessary features of an object.
- - Polymorphism: Ability of objects to take on multiple forms or behaviors based on the context.
- - Inheritance: Mechanism where a new class inherits properties and behaviors of an existing class.
- - Encapsulation: Bundling of data and methods that operate on the data, restricting access to the data from outside the object.
- - **Abstraction, Polymorphism, Inheritance, Encapsulation**:
- - Abstraction: Concept of hiding the implementation details and showing only the necessary features of an object.
- - Polymorphism: Ability of objects to take on multiple forms or behaviors based on the context.
- - Inheritance: Mechanism where a new class inherits properties and behaviors of an existing class.
- - Encapsulation: Bundling of data and methods that operate on the data, restricting access to the data from outside the object.
- - **Method Overloading**:
- - Method overloading is a feature in object-oriented programming where multiple methods can have the same name but different parameters.
- - The compiler determines which method to execute based on the number and type of arguments passed.
- - **Function Overloading**:
- - Function overloading is similar to method overloading but applies to functions outside of classes.
- - It allows multiple functions with the same name but different parameter lists.
- - **Swap two numbers without using a third variable (JavaScript)**:
- ```javascript
- [a, b ]=[b,a]
- ```
- - **One query of MySQL using join**:
- ```sql
- SELECT * FROM table1 JOIN table2 ON table1.id = table2.table1_id;
- ```
- - **ES6 Feature in Frontend**:
- - ES6 introduced many new features like arrow functions, let and const for variable declaration, classes for object-oriented programming, template literals, destructuring assignment, etc.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement