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

Publicado em: 11 Novembro 2020
no canal de: 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


Nesta página do site você pode assistir ao vídeo on-line C++ Programming- Type conversion |class to basic |basic to class duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário KUNDAN TUTORIALS 11 Novembro 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 12,389 vezes e gostou 220 espectadores. Boa visualização!