USER DEFINED DATATYPES

Опубликовано: 16 Март 2026
на канале: PRINCE OF PROGRAMMING
408
like

#C #CTUTORIAL #DATATYPES #USERDEFINED #structures #unions #enumerations #datatypes #user_defined_datatypes #CLANGUAGE #CPROGRAM #CPROGRAMMING #int #float #char #double #void #datatypes #primitive_datatypes #userdefined_datatypes #Programming_Language #youtubechannel #youtube #youtuber #youtubers #subscribe #youtubevideos #sub #youtubevideo #like #instagram #programming #coding #programmer #python #developer #technology #code #coder #computerscience #tech #software #codinglife #linux #softwaredeveloper #programmingmemes #programmers #programminglife #hacking #machinelearning #php #computer #softwareengineer #bhfyp


Welcome to my channel Prince of Programming👨‍🎓

   / @princeofprogramming  

This tutorial will give you a full introduction into USER DEFINED DATATYPES.

   • USER DEFINED DATATYPES  

Give this video a thumps up👍

Share & subscribe for more videos😏

Show your support to recover the channel❤

Click the bell icon to get notified for new videos🔔

Feel free to drop your doubts in the comment section📗

TOPIC12-USER DEFINED DATATYPES    • USER DEFINED DATATYPES  

User Defined Datatypes:
 User defined data types are written by the users according to their needs.
 It is derived from the basic data types.
 Some of the user defined data types are:
1. Structures
2. Unions
3. Enumeration
Structures:
 Structures are nothing but a collection of data items.
 Structures can hold set of data items of different data types under a single name.
 This data type can be created using the keyword struct.

Syntax:
struct structure-name
{
datatype member name 1;
datatype member name 2;
………………………
datatype member name n;
} structure-variable-name;

Unions:
 Unions can hold set of data items of different data types under a single name.
 This data type can be created using the keyword

Syntax:
union union-name
{
datatype member name 1;
datatype member name 2;
………………………
datatype member name n;
} union-variable-name;

Enumeration:
 Enumerated data types are those in which a variable can contain only some specific set of values.
 For Example: If a variable needs to hold only the months, it can have any one of the values from January to December.
 These types of variables can be created as enumerated data types.
 This data type can be created using the keyword enum.
 Syntax: enum type_name{value1,value2,……valueN};