Created
June 19, 2019 06:02
-
-
Save Rajssss/d793b4fc40f975b5b90ea41365b9ebd8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <ctype.h> | |
| #include <string.h> | |
| typedef struct student | |
| { | |
| int roll; | |
| float marks; | |
| char Name[25]; | |
| char Gender; | |
| }student; | |
| int main() | |
| { | |
| int N, Flag=1; | |
| printf("Enter number of students =>"); | |
| scanf("%d",&N); | |
| student st[N]; | |
| do | |
| { | |
| printf("Enter details for student %d...\nEnter Roll NO. =>",Flag); | |
| scanf("%d",&st[Flag].roll); | |
| printf("Enter Marks =>"); | |
| scanf("%d",&st[Flag].marks); | |
| getchar(); | |
| printf("Enter Name =>"); | |
| gets(st[Flag].Name); | |
| printf("Enter Gender =>"); | |
| scanf("%c",&st[Flag].Gender); | |
| Flag++; | |
| }while(Flag<N); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment