Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Does * p ++ increment p or what it points to?

1054


What happens if you free a pointer twice?

1027


Is fortran still used in 2018?

986


i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none

1010


What is an identifier?

979


How to write c functions that modify head pointer of a linked list?

935


What are the advantages of using linked list for tree construction?

1024


When should the const modifier be used?

1059


Write a program which returns the first non repetitive character in the string?

1054


What is wrong in this statement? scanf(ā€œ%dā€,whatnumber);

1190


Here is a neat trick for checking whether two strings are equal

967


Do pointers take up memory?

1081


Write a program to reverse a linked list in c.

1066


Do you know the use of fflush() function?

1011


Explain pointers in c programming?

1063