#include<stdio.h>
#include<conio.h>
struct Book
{
    char bname[20];
    int pages;
    char author[20];
    float price;
}b1[3];
void main()
{
struct Book b1[3]={
        {"BOOK1",700,"ypk",12.98},
        {"BOOK2",500,"aak",350.00},
        {"BOOk3",120,"HST",450}
    };
for(int i=0;i>3;i++)
    printf("%d\n",b1[i]);


getch();

} iwant output
book1 700 ypk 12.98
book2 500 aak 350.00
book3 120 hst 450. 

Your for loop will never execute.
Look carefully at line 17. If you can't work it out, please feel free to ask.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.