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 |
Is there something we can do in C but not in C++? Declare variable names that are keywords in C++ but not C.
m=++i&&++j(||)k++ printf("%d"i,j,k,m)
Explain command-line arguments in C.
main() { printf("hello%d",print("QUARK test?")); }
What is dangling pointer in c?
In the following control structure which is faster? 1.Switch 2.If-else and which consumes more memory?
What is the difference between memcpy and memmove?
What is Generic pointer? What is the purpose of Generic pointer? Where it is used?
Why c is procedure oriented?
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration
what does static variable mean?
Describe for loop and write a c program to sum the series X + x2/2! + x3 /3! + …….. up to fifteen terms.