//WAP to display the structure elements
#include<iostream.h>
#include<conio.h>
//declaration of structure containing
three data types
struct
college
{
int a;
float b;
char c;
};
void
main()
{
clrscr();
college
clg;
//development of object of structure for assessing
elements of structure
clg.a=17;
clg.b=44.25;
clg.c='s';
cout<<"\nContent
of int="<<clg.a<<endl;
cout<<"Content
of float="<<clg.b<<endl;
cout<<"Contents
of char="<<clg.c<<endl;
getch();
}
Sir what is structure
ReplyDelete