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 |
Can the “if” function be used in comparing strings?
What is the meaning When we write "#include" what is # and what does include does there???
A C E G H +B D F A I ------------ E F G H D
Is an array parameter is always "by reference" ?
Is main is user defined function?
What is the use of ?
write a function for strtok()??
Write a program to print factorial of given number without using recursion?
writ a program to compare using strcmp VIVA and viva with its output.
1)what are limitations for recursive function? 2)write a program to read a text file and count the number of characters in the text file
what is the basis for selection of arrays or pointers as data structure in a program
c program to arrange digits in a no in ascending and descending order