1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | #include<stdio.h> #include<conio.h> #include<string.h> struct Student { int stdid; char name[15]; float marks; }; int main() { int loc,mini,i; struct Student b[10]; for(i=0;i<=9;i++) { printf("Enter Student ID\n"); scanf("%d",&b[i].stdid); scanf("%s",&b[i].name); scanf("%f",&b[i].marks); mini=b[0].marks; } loc=0; for(i=0;i<=9;i++) if(b[i].marks<mini) { mini=b[i].marks; loc=i; } printf("Student having minimum marks is\n"); printf("studentID=%d\n",b[loc].stdid); printf("studentname=%s\n",b[loc].name); printf("marks=%f\n",b[loc].marks); } |
Related Posts
10 nob input Display Prime or composite.
#include<stdio.h> int main() { int i,n[10],c=0; printf ("Enter a number \n"); f[...]
input Nob Search and sorting. using Array
#include<stdio.h> int main() { int r[20],e,s,a; printf("Enter array size"); sc[...]
10 nob input and display odd Number
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 #include<stdio.h> int [...]
20 nob input and display even Number.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 #include<stdio.h> main () { int n[[...]
Display Location and Show its Address.
1 2 3 4 5 6 7 8 9 #include<stdio.h> main() { int i,n[]={10,14,16,81,99,12}; for(i=0;i<[...]
Subscribe to:
Post Comments
(
Atom
)
Post a Comment
Click to see the code!
To insert emoticon you must added at least one space before the code.