C++ Programming- Type conversion |class to basic |basic to class

Опубликовано: 11 Ноябрь 2020
на канале: KUNDAN TUTORIALS
12,389
220

Easy way Easy to learn C++ programming in simple and easy steps way
Also includes the Syllabus of Classes XIth & XIIth.

---------------------------------------------------------------------------------------------------------------
type conversion based on some fixed rules. In assignment operation, variable at the right hand side is automatically converted to the type of the variable on the left
But this automated type promotion will work well if both data types are of primary data type or both are of same user-defined data type. But it will create problem when one data type is user-defined data type and another is primary data type. So for that we have to use some special function for type conversion as in such cases automatic type conversion can not be performed by the language itself.

There are three types of type conversion are possible:

Conversion from basic type to the class type.
Conversion from class type to basic type.
Conversion from one class to another class type.


Conversion from Basic type to the Class type

In this type of conversion the source type is basic type and the destination type is class type. Means basic data type is converted into the class type.
Conversion from Class type to Basic type
In this type of conversion the source type is class type and the destination type is basic type. Means class data type is converted into the basic type.
Conversion from one Class to another Class type
In this type of conversion both the type that is source type and the destination type are of class type. Means the source type is of class type and the destination type is also of the class type. In other words, one class data type is converted into the another class type.

-------------------------------------------------------------------------------------------------------------------------------------------------------

LINK RELATED PROGRAMS C++ programs:https://github.com/saritaverma60/OOPs...


LINK RELATED PROGRAMS Python programs :https://github.com/saritaverma60/pyth...
LINK FOR COMPLETE PLAYLIST :   • C++ Programming - OOPs CONCEPT  
FACEBOOK LINK: https://www.facebook.com/Kundan-Tutor...

#Kundantutorials#classtobasic#basictoclass#typeconversion


На этой странице сайта вы можете посмотреть видео онлайн C++ Programming- Type conversion |class to basic |basic to class длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь KUNDAN TUTORIALS 11 Ноябрь 2020, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 12,389 раз и оно понравилось 220 зрителям. Приятного просмотра!