WAP to accept rollno,course name & marks of a student &
display grade if total marks is above 200?
Answers were Sorted based on User's Feedback
Answer / rohit
#include<stdio.h>
#include<conio.h>
struct mix
{
int rollno,m1,m2,m3,total;
char cn;
};
void main()
{
mix s1;
printf("Enter roll no:");
scanf("%d",&s1.rollno);
printf("Enter course name:");
scanf("%s",s1.cn);
printf("Enter marks of 3 subjects out of 150:");
scanf("%d%d%d",&s1.m1,&s1.m2,&s1.m3);
s1.total=s1.m1+s1.m2+s1.m3;
if(s1.total>200)
{
printf("A grade");
}
getch();
}
Is This Answer Correct ? | 23 Yes | 15 No |
What are types of functions?
Is it better to use malloc() or calloc()?
#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} what would be the output?
write a program to display the frequency of each element in a given array in c language
What does calloc stand for?
Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates
What are the differences between Structures and Arrays?
What is pointer to pointer in c language?
What is infinite loop?
what is the differnce between AF_INET and PF_INET?
5 Answers Systems Plus, Wipro,
What is array of structure in c?
How can I find out if there are characters available for reading?