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 are void pointers in c?
Write a program to identify if a given binary tree is balanced or not.
Why clrscr is used after variable declaration?
A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none
How can I manipulate individual bits?
write a program to generate address labels using structures?
Explain the properties of union.
What is dynamic dispatch in c++?
hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?
Can a void pointer point to a function?
Explain the use of 'auto' keyword in c programming?
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
Explain what is a stream?
What are the benefits of organizational structure?
What is NULL pointer?