saving . . . saved Difference between Union and Typedef has been deleted. Difference between Union and Typedef has been hidden .
Difference between Union and Typedef
Title
Question
What is the difference declaring the structure of union and typedef?

Advance-C Union-and-Typedef 04-05 min 0-10 sec 20-05-20, 6:01 p.m. enprabhu@gmail.com

Answers:

Union is a data type that allows you to store different data types in the same memory location, i.e., the program can use any one data type at a time. 

Typedef can be used to give a new name for the extisting types. 
For example, consider the definition given below in your program
typedef int INTEGER;  

Now, you can use 
INTEGER a1, a2;
which will be the same as
int a1,a2;
24-05-20, 8:32 p.m. nags


Union is a data type that allows you to store different data types in the same memory locations i,e, the program can use any one data type at a time

Typedef can be used to give a nea name for the existing types.
For example , consider the definition given below in your program
Typedef int INTEGER;

Now ,you can use 
INTEGER a1,a2;
which will be the same as 
int a1,a2
01-04-21, 12:56 p.m. karishmasheriff0@gmail.com


1
01-04-21, 12:57 p.m. karishmasheriff0@gmail.com


Log-in to answer to this question.