Advertisement
satishfrontenddev5

Untitled

Feb 18th, 2024
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 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.?
  2.  
  3. - **Difference between C and C++**:
  4.   - C is a procedural programming language, while C++ is a multi-paradigm language with support for both procedural and object-oriented programming.
  5.   - C++ includes features like classes, inheritance, polymorphism, and encapsulation, which are not present in C.
  6.  
  7. - **Concept of OOPs, Pillars of OOPs**:
  8.   - OOPs (Object-Oriented Programming) is a programming paradigm based on the concept of "objects", which can contain data and code.
  9.   - Pillars of OOPs:
  10.     - Abstraction: Hides the complex implementation details and only shows the necessary features of an object.
  11.     - Polymorphism: Ability of objects to take on multiple forms or behaviors based on the context.
  12.     - Inheritance: Mechanism where a new class inherits properties and behaviors of an existing class.
  13.     - Encapsulation: Bundling of data and methods that operate on the data, restricting access to the data from outside the object.
  14.  
  15. - **Abstraction, Polymorphism, Inheritance, Encapsulation**:
  16.   - Abstraction: Concept of hiding the implementation details and showing only the necessary features of an object.
  17.   - Polymorphism: Ability of objects to take on multiple forms or behaviors based on the context.
  18.   - Inheritance: Mechanism where a new class inherits properties and behaviors of an existing class.
  19.   - Encapsulation: Bundling of data and methods that operate on the data, restricting access to the data from outside the object.
  20.  
  21. - **Method Overloading**:
  22.   - Method overloading is a feature in object-oriented programming where multiple methods can have the same name but different parameters.
  23.   - The compiler determines which method to execute based on the number and type of arguments passed.
  24.  
  25. - **Function Overloading**:
  26.   - Function overloading is similar to method overloading but applies to functions outside of classes.
  27.   - It allows multiple functions with the same name but different parameter lists.
  28.  
  29. - **Swap two numbers without using a third variable (JavaScript)**:
  30.   ```javascript
  31.   [a, b ]=[b,a]
  32.   ```
  33.  
  34. - **One query of MySQL using join**:
  35.   ```sql
  36.   SELECT * FROM table1 JOIN table2 ON table1.id = table2.table1_id;
  37.   ```
  38.  
  39. - **ES6 Feature in Frontend**:
  40.   - 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