WAP to accept rollno,course name & marks of a student &
display grade if total marks is above 200?
Answer Posted / 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 |
Post New Answer View All Answers
Does * p ++ increment p or what it points to?
What happens if you free a pointer twice?
Is fortran still used in 2018?
i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none
What is an identifier?
How to write c functions that modify head pointer of a linked list?
What are the advantages of using linked list for tree construction?
When should the const modifier be used?
Write a program which returns the first non repetitive character in the string?
What is wrong in this statement? scanf(ā%dā,whatnumber);
Here is a neat trick for checking whether two strings are equal
Do pointers take up memory?
Write a program to reverse a linked list in c.
Do you know the use of fflush() function?
Explain pointers in c programming?