A C program to store the name, roll no and marks of a student


// A C program to store the neme, roll no and marks of a student

#include<stdio.h>
#include<conio.h>
void main()
{
struct student
{
char name[50];
int roll;
float marks;
}s;
clrscr();
printf("Enter name: ");
scanf("%s", s.name);
printf("Enter roll number: ");
scanf("%d", &s.roll);
printf("Enter marks: ");
scanf("%f", &s.marks);
printf("Name: ");
puts(s.name);
printf("Roll number: %d\n",s.roll);
printf("Marks: %.1f\n", s.marks);
getch();
}
Output:


A C program to store the neme, roll no and marks of a student, write a program to store the name roll no and marks of a student, my knowledge to you dude














Post a Comment

0 Comments