#include<stdio.h>
#include<conio.h>
typedef struct
{
int rno;
char name[10];
float marks;
}stu;
stu stu3;
void getf(stu * stutmp);
void show(stu * stutmp);
void main()
{
clrscr();
getf(&stu3);
show(&stu3);
getch();
}
void getf(stu *stutmp)
{
scanf(" %d",&stutmp->rno);
printf("%d\n",stutmp->rno);
scanf(" %s",stutmp->name);
printf("%s\n",stutmp->name);
scanf(" %f",&stutmp->marks);
printf("%f\n",stutmp->marks);
getch();
}
void show(stu * stutmp)
{
printf("Name: %s\n",stutmp->name);
printf("RNO: %d\n",stutmp->rno);
printf("MARJKS: %f\n",stutmp->marks);
}
kaio-ken 0 Newbie Poster
kvprajapati 1,826 Posting Genius Team Colleague
Dave Sinkula commented: Out of all the times I've been to that FAQ, I never noticed this one there. +24
kaio-ken 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.