Saturday, 30 August 2014

C PROGRAM ON STRUCTURES

C PROGRAM ON STRUCTURES

#include<stdio.h>
#include<conio.h>
void main()
{
struct notebook
{
char name[20];
int pages;
float price;
};
struct notebook nb={"long note book",192,12.50};
clrscr();
printf("name=%s/n",nb.name);
printf("page=%d/n",nb.pages);
printf("price=%f/n",nb.price);
getch();
}

No comments: