Guys, ok after trying around stuff, I get that this is the way you initialize a structure in C.
#include<stdio.h>
#include<conio.h>
typedef struct s
{
int data;
char gender;
}st;
st s1={5,'a'};
int main(void)
{
printf("%d "%c",s1.data,s1.gender);
getch();
return 0;
}
But suppose i make a new instance of the structure, i again have to do a
st s2={5,'a'};
Couldnt this have been made much simpler if the structure could be defined as
typedef struct s
{
int data = 5;
char gender = 'a'
}s1,s2;