#include<stdio.h>
#include<conio.h>
void main()
{
int i,n, j;
struct student
{
int id_no;
char name[40];
char address[40];
char combination[3];
int age;
}obj[100], temp;
printf("How many records to enter :" );
scanf("%d",&n);
printf("***** Enter students information : *****\n\n");
for(i=0; i<=n; i++)
{
printf("RECORD NO. %d",i+1);
printf("Enter student id_number : ");
scanf("%s",&obj[i].id_no);
printf("Enter name of the student: ");
scanf("%s",&obj[i].name);
printf("Enter address of the student : ");
scanf("%s",&obj[i].address);
printf("Enter combination of the student : ");
scanf("%s",&obj[i].combination);
printf("Enter age of the student : ");
scanf("%d",&obj[i].age);
}
for(i=1; i<=n-1; i++)
{
for(j=i+1; j<=n; j++)
{
if(obj[i].id_no>obj[i].id_no)
{
temp=obj[i];
obj[i]=obj[j];
obj[j] = temp;
}
}
}
printf("***** The entered information in(id_no) sorted order is : *****\n\n");
for(i=1; i<=n; i++)
{
printf("RECORD NO. %d",i+1);
printf("Enter student id_number : ");
scanf("%d",&obj[i].id_no);
printf("Enter name of the student: ");
scanf("%s",&obj[i].name);
printf("Enter address of the student : ");
scanf("%s",&obj[i].address);
printf("Enter combination of the student : ");
scanf("%s",&obj[i].combination);
printf("Enter age of the student : ");
scanf("%d",&obj[i].age);
}
getch();
}

Home       |      About Us       |     Portfolio       |      Services       |       Career        |    Contact Us       |      Industrial Training        |      Achievement 
Corporate Services
  Web Design and development
  Web Promotion (SEO)
  Multimedia/CD Presentation
  Software development

  E.Commerce

Training@balujalabs

  Software Courses
  Hardware Courses
  Networking.Courses
  Mobile Repairing Courses
  UGC Degrees
Student Corner
 Programming & Projects
 Placement Papers
 Project Ideas
 Synopsis Ideas

  Franchise Section

 Administrator
Franchise Inquiry
 
 
Program to enter records of students and display in sorted order.


 

 

 

 

 

 

 

 

 

 

1 To initialize the member fields of a structures student and display its contents
2 To assign data to various fields of structure using function and then display it
3 To initialize the members of a structure and display them.
4 To enter the records of number of students and then display them using nested structure
5 To initialize the data of a student and display the contents using the pointers.
6 To initialize the data of a student and display the contents using the pointers.
7 Declare the structure variables but initialize only the first one with data. The other two structure variables are them initialize when the first structures variables is assigned to them.
8 To declare structure as a number of a union and display its contents.
9 The example to store maximum 100 records of students. The constant MAX is initialized by 100.
10 To pass whole structure to a function.
11 A program to enter and display the employee data using nested structure
12 Program to enter records of students and display in sorted order.
13 To enter the record of a student using the structure operator and display the external contents using indirection operator.
14 Write a program to use enumerated data type to assigned variable to the enumerated data and then display that number of the day using the variables


 

 

 

 

     
Home       |      About Us       |     Portfolio       |      Services       |       Career        |    Contact Us       |      Industrial Training        |      Achievement