Ch:12 Basics of C++

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

What is the Structure of a program?

#include<iostream.h> #include<conio.h> void main ( ) { cout<< "My name is Riya"; getch(); }

What is Class?

A class is a group of object that share common properties and relationship.

What is a function? Write the importance of the main () function.

A function is a block of code that performs a service, such as adding two data numbers or printing to the screen. A class is a collection of data and related functions. In a C++ program, the main () function specifies the programs starting location. As a program becomes longer and complex, you will be dividing it into smaller parts. The main () function will identify the part of the program from where the execution starts.

What is abstraction?

Abstraction refers to act of representing essential features without including the background details or explanations.

What do you understand by the concept of objects and classes?

An object is any particular entity that possesses some properties and behaviour. Classes define the properties and the behaviour of a set of objects.

What is C++?

C++ is written by Bjarne Stroustrop at Bell Labs during 1983-1985. It is a powerful programming language used for developing any kind of software. This language is based on OOP's concept.

Comments

For a single line comment, we use // at the begining of the statement and for multiple lines comment, we use (/*) and (*/). At the beginning and at the end of the comment.

Inheritance

In OOP, Inheritance is a way to form new classes (instances of which are called Objects) using classes that have already been defined.

Instance

Instance is a mechanism to show the relationship of an object to the class to which it belongs. So, we can say that an object is an instance of a class.

What is iostream statement?

It is a line beginning with # sign. It processes the source code before it is actually compiled

What does #include<iostream.h> tells?

It tells the processor the iostream header file. This specific file includes the declaration of the basic input/output functions in it.

What is OOP?

Object Oriented Programming It is a technology in which a program is organised into self-containing, reusable modules that possesses same properties and behavior.

Void main()

The main function is the point where all C++ program start their execution. The word main is followed by opening and closing brackets. Right after the main function the curly braces are enclosed.

What is header file?

They are files with .h extensions that we use with #include statement. Each header file has different functions and different purpose in it. For example, <math.h>, <conio.h>

Write about input/output operators.

cout (the standard output stream) is normally directed to the screen. cin (the standard input stream) is normally assigned to the keyboard


Set pelajaran terkait

Business Law II-Exam 5 (Chapters 36, 37, 44)

View Set

women's gender sexuality midterm

View Set

Descubre 1 Lección 8 Pronunciación p271 ll, ñ, c, and z

View Set

AP Gov- UNIT 5: Political Participation

View Set

Topic 3 Interest Groups: Organizing for Influence

View Set

AGEC FINAL P1, AGEC 3413 test 3 (chapter 6 done and half of 7), agec test 3 (just 10 for now)

View Set

BFOR 203 Final - Hashing-Symmetric-Asymmetric

View Set

Management Information Systems Chapter 4 Ethics and Information Security: MIS Business Concerns

View Set