Table of Contents
In this tutorial, we will discuss the concept of Nested structure in C programming language.
Nested structure is allowed in C programming language. Nested structure means structure within the another structure. It means we can declare one structure inside another structure.
We can create nesting structure in two way:
Syntex
struct strucuture_Name { <variable_type1> <variable_name>; <variable_type2> <variable_name>; };
struct strucuture_Name { <variable_type1> <variable_name>; <variable_type2> <variable_name>; };
Example
struct house_address
{
char born_city[30];
int postal_code;
};//one structure
struc student
{ int stu_id; char stu_name;
};//another structure
struct Employee { int emp_id; char emp_name; struct dob { int dd; int mm; int yyyy; } }
When the above code is executed it produces the following result
employee id :14
employee name :jegan sing
employee dob :19/4/2017
Program 2
When the above code is executed it produces the following result
22
33
44
55
Subtract two numbers using method overriding Program 1
PHP Star triangle Pattern program Here's a simple Java program that demonstrates how to print…
Using Function or Method to Write to temperature conversion: Fahrenheit into Celsius In this article,…
Function or method of temperature conversion from Fahrenheit into Celsius In this article, we will…
Write temperature conversion program: from Fahrenheit to Celsius In this article, we will discuss the…
How to write a program to convert Fahrenheit into Celsius In this article, we will…
This website uses cookies.