I am trying to create the record of student without string.h header file
My code
Code:
#include<stdio.h>
struct student
{
char name [10];
int age;
float hight ;
char section;
}student1;
int main()
{
student1.name[10] = "shyama";
student1.age = 18;
student1.hight = 5.8;
student1.section = 'A';
printf(" name %s \n", student1.name);
printf(" age %d \n", student1.age);
printf(" hight %f \n", student1.hight);
printf(" section %c \n", student1.section);
return 0;
}
Result
name
age 18
hight 5.800000
section A
Why the name of student doesn't print ?