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 |
I need a sort of an approximate strcmp routine?
What is define directive?
Sir,please help me out with the output of this programme:- #include<stdio.h> #include<conio.h> void main() { int a=18,b=12,i; for(i=a<b?a:b;a%i||b%i;i--); printf("%d %d",i); }
How to reverse alternate words in a given line of string For Eg: my name is narasimha output : my eman is ahmisaran
Why is it important to memset a variable, immediately after allocating memory to it ?
what is the function of pragma directive in c?
What is this infamous null pointer, anyway?
Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..
increment operateor (++)and decrament(--) #include<stdio.h> #inclide<conio.h> main() { int x=15; while(x!=0) scanf("%d",&x); {
Why do we need a structure?
Explain the difference between the local variable and global variable in c?
how to add numbers without using arithmetic operators.