1. Write Short Notes on C++


Write a simple C++ Program to add two numbers



Download 59,25 Kb.
bet2/5
Sana26.02.2022
Hajmi59,25 Kb.
#470881
1   2   3   4   5
Bog'liq
computer science

4.Write a simple C++ Program to add two numbers

5. Write a Program using C++ to multiply two numbers

6.Discuss about C++ Identifiers with relevant examples

All C++ variables must be identified with unique names.
These unique names are called identifiers.
Identifiers can be short names (like x and y) or more descriptive names (age, sum, totalVolume).
Note: It is recommended to use descriptive names in order to create understandable and maintainable code:


7.What are single-line and multi-line comments in C++ ?

Single-line comments (informally, C++ style), start with // and continue until the end of the line. If the last character in a comment line is a \ the comment will continue in the next line.


Multi-line comments (informally, C style), start with /* and end with */ .

8.Elaborate Features of C++ compiler directives

As the name suggests Preprocessors are programs that process our source code before compilation.


Preprocessor programs provide preprocessors directives which tell the compiler to preprocess the source code before compiling. All of these preprocessor directives begin with a ‘#’ (hash) symbol. The ‘#’ symbol indicates that, whatever statement starts with #, is going to the preprocessor program, and preprocessor program will execute this statement. Examples of some preprocessor directives are: #include, #define, #ifndef etc. Remember that # symbol only provides a path that it will go to the preprocessor, and command such as include is processed by preprocessor program. For example, include will include extra code to your program. We can place these preprocessor directives anywhere in our program.

There are 4 main types of preprocessor directives:

Macros
File Inclusion
Conditional Compilation
Other directives

9.Discuss about Programming Style of C++

C++ is a multiparadigm programming language. That is, C++ supports several styles of programming:


C-style programming. C++ is a better C, maintaining C's flexibility and runtime efficiency while improving type checking.
Data abstraction. The ability to create types that suit our needs.
Object-oriented programming. The idea of programming with class hierarchies and runtime polymorphism.
Generic programming. Programming using type parameterization of both datatypes and algorithms.


Download 59,25 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish