Tuesday, 13 April 2021

Structure in C - 1

 


#include<stdio.h>

//#include<iostream.h>

#include<conio.h>

struct Book

{

char code;

int pages;

float price;

//void show();

}b;

main()

{

clrscr();

//int a=5;

//int &b=a;

b.code='A';

b.pages=400;

b.price=150;

printf("%c  %d  %f",b.code,b.pages,b.price);

getch();

}

No comments:

Post a Comment