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...

Q-1: Create a structure to specify data on students given
below:
Roll number, Name, Department, Course, Year of joining
Assume that there are not more than 450 students in the
college.

Answer Posted / abuubkar

#include <stdio.h>
#include <string.h>
struct student
{
int roll;
char name[50];
char dept[50];
int course;
int yoj;
};
main()
{
struct student std[5];
int i;
for (i=0;i<2;i++)
{
printf("enter roll of student %d
",i+1);
scanf("%d",&std[i].roll);
printf("enter name of student %d
",i+1);
scanf("%s",&std[i].name);
printf("enter department of student %d
",i+1);
scanf("%s",&std[i].dept);
printf("enter couse of student %d
",i+1);
scanf("%d",&std[i].course);
printf("enter year of join of the student %d
",i+1);
scanf("%d",&std[i].yoj);
}
for (i=0;i<2;i++)
{
printf("The information of student %d is
",i+1);
printf("%d
%s
%s
%d
%d",std[i].roll,std[i].name,std[i].dept,std[i].course,std[i].yoj);
}

}

Is This Answer Correct ?    2 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program to identify if a given binary tree is balanced or not.

1234


Can true be a variable name in c?

1090


Explain the use of bit fieild.

1203


Can the curly brackets { } be used to enclose a single line of code?

1217


What are near, far and huge pointers?

1116


What does c value mean?

1261


How can I read/write structures from/to data files?

1014


#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??

2013


Explain how do you search data in a data file using random access method?

1177


What is c system32 taskhostw exe?

1073


how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions

3233


What is array in c with example?

1360


Is it possible to initialize a variable at the time it was declared?

1258


Explain how can I read and write comma-delimited text?

1231


What is the difference between fread and fwrite function?

1133