#include<stdio.h>
#include<conio.h>
void main()
{
typedef struct student
{
int rollno;
char name[20];
}stud;
stud s1,*p1;
p1=&s1;
printf("enter the roll no and name\n");
scanf("%d%s",&(p1->rollno),p1->name);
printf("rollno->%d name->%s",p1->rollno,p1->name);
getch();
}
#include<conio.h>
void main()
{
typedef struct student
{
int rollno;
char name[20];
}stud;
stud s1,*p1;
p1=&s1;
printf("enter the roll no and name\n");
scanf("%d%s",&(p1->rollno),p1->name);
printf("rollno->%d name->%s",p1->rollno,p1->name);
getch();
}
No comments:
Post a Comment