C Programming Structure Examples in C

C Programming Structure Examples in C

#include<stdio.h>

struct student{
int roll;
char name[10];
};

main()
{

struct student st={1360,"DELU"};

printf("Name is %s\n",st.name);

printf("Roll no. is %d\n",st.roll);

st.roll=1226;

printf("Roll no. is %d\n",st.roll);

}

Related Posts