c
program by using structures
#include<stdio.h>
#include<string.h>
struct
student
{
int id;
char name[20];
float percentage;
};
int main()
{
Struct student record={0};//Initializing to
null
Record.id=1;
Strcpy(record.name,”xxxx”);
Record.percentage=68.5;
Printf(“Id
is:%d\n”,record.id);
Printf(“Name
is:%d\n”,record.name);
Printf(“Percentage
is:%d\n”,record.percentage);
return 0;
}
No comments:
Post a Comment