GoogelAddUnit1

Thursday, 10 March 2011

C Program on Student details using structure.


/* Student details using structure */                                                      

#include<stdio.h>
#include<conio.h>
struct stu
{
 int stuno;
 char sname[10];
 int mar;
} ;
void main()
{
    struct stu s[10];
    int n,i;
    clrscr();
    printf("\n how many records");
    scanf("%d",&n);
    printf("\n enter the records");
    for(i=0;i<n;i++)
    scanf("%d%s%d",&s[i].stuno,s[i].sname,&s[i].mar);
     printf("\n entered records are");
    for(i=0;i<n;i++)
    printf("\n %d\n %s\n %d",s[i].stuno,s[i].sname,s[i].mar);
    getch();
}

2 comments:

  1. nahi hoga.....................achcha lagao na koi...........jo karney mein bhi maja aaye.....!!

    ReplyDelete
  2. plz give me the output of this program............

    ReplyDelete