Skip to main content

C++ Object Oriented Programming Language Important Questions For BCA Students(One liner)

 Q1. What is OOP?

Ans Object-Oriented Programming focuses on objects and classes rather than procedures.


Q2.What is a class?

Ans A class is a blueprint for creating objects.


Q3. What is an object?

Ans An object is an instance of a class.


Q4. What is encapsulation?

Ans Encapsulation is binding data and methods together in a single unit.


Q5.What is inheritance?

Ans Inheritance allows a class to acquire properties and behavior of another class.


Q6. What is polymorphism?

Ans The ability of functions or operators to behave differently based on context.


Q7. What is overloading?

Ans. Defining multiple functions with the same name but different parameters.


Q8. How is C related to C++?

Ans. C++ is an extension of C that adds object-oriented features.


Q9. What is the use of cout?

Ans cout is used for displaying output on the screen.


Q10 What is the use of cin?

Ans cin is used for taking input from the user.


Q11. What is a preprocessor directive?

Ans A statement that begins with # and is processed before compilation.


Q12. How are comments written in C++?

A: Using // for single line and /* ... */ for multi-line.


Q13. What does setw() manipulator do?

Ans  It sets the width of the output field.


Q14 What are arithmetic operators?

A: Operators used for mathematical operations like +, -, *, /, %.

Comments

Popular posts from this blog

Computer Origin and Definition || Brief History of Computer

Meaning of the word computer Computer word derived from a Latin word "compute" which means "to calculate" "to count" "to sum up" or "think together". so, in short, the word computer means a device that performs computation". According to Wikipedia computer was first used in a book called "the young mans gleanings" in 1613. Definition - What does  Computer  mean? A computer is an electronic device or machine that can perform arithmetic operations (like addition, subtraction, multiplication, division, etc as well as logical operations (like comparisons). A computer is capable of receiving data or information in the form of input and perform a sequence of operations on it and give output to the user. In simpler words, computers accept data to store it manipulates it and gives a result. A computer is a programmed device with a set of instructions to perform specific tasks and generate results at a very high speed. ...

Applications Of Computers || Basic Guide

The computer has applications in almost every aspect of life. Some of the important ones are: Business Banking Insurance Education Marketing Healthcare Engineering design Defense Communication Governments Medicine Entertainment Home Sports Business A computer has a high speed of calculation, diligence, accuracy, reliability, or versatility which has made it an integrated part in all business organizations. The computer is used in business organizations for − Payroll calculations Budgeting Sales analysis Financial forecasting Managing employee database Maintenance of stocks, etc. Banking Today, banking is almost totally dependent on computers. Banks provide the following facilities − Online accounting facility, which includes checking current balance, making deposits and overdrafts, checking interest charges, shares, and trustee records. ATM machines that are completely automated are making it even easier for customers to deal with ban...