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
What is the best style for code layout in c?
What is the size of empty structure in c?
What is the size of array float a(10)?
Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon
Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.
Can a pointer be static?
Which node is more powerful and can handle local information processing or graphics processing?
Why void main is used in c?
Is c easier than java?
How can you restore a redirected standard stream?
What is the process of writing the null pointer?
What is c system32 taskhostw exe?
What are the types of functions in c?
How to get string length of given string in c?
How can I change the size of the dynamically allocated array?