C program to Use structure within union & display the contents of structure elements

Problem statement: Write a program to use structure within union , display the contents of structure elements

Below is the solution for the above problem statement with the help of c program.

Program: C program to Use structure within union & display the contents of structure elements

Program Output

Enter details:
Enter name : Pritesh
Enter rollno: 10
Enter sex: M
Enter percentage: 89
The student details are:
Name : Pritesh
Rollno : 10
Sex : M
Percentage : 89.000000

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:


Editorial Staff

Editorial Staff at FreeWebMentor is a team of professional developers.