স্ট্রাকচার ও অ্যারে ব্যবহার করে লেখা এই প্রোগ্রামটি কী ঠিক আছে?

#include <stdio.h>

struct Bookinfo
{
      char bname[20];
      int pages;
      double price;
} book[3];

int main(void)
{
    int i;

    for(i = 0; i < 3; i++)
    {
        printf("Enter the Name of Book    : ");
        scanf("%s", book[i].bname);
        printf("Enter the Number of Pages : ");
        scanf("%d", &book[i].pages);
        printf("Enter the Price of Book   : ");
        scanf("%lf", &book[i].price);
    }

    printf("\n--------- Book Details ------------\n");

    for(i = 0; i < 3; i++)
    {
        printf("Name of Book    : %s\n", book[i].bname);
        printf("Number of Pages : %d\n", book[i].pages);
        printf("Price of Book   : %f\n", book[i].price);
    }

    return 0;
}

asked 22 Jan, 15:59

md_nayeem's gravatar image

md_nayeem
655

closed 23 Jan, 15:36

Tamim%20Shahriar%20Subeen's gravatar image

Tamim Shahriar Subeen ♦♦
6.0k1126

এই প্রশ্নটা এই প্রশ্নের পুনরাবৃত্তি!

(22 Jan, 19:57) Ashfaqur Rahman

The question has been closed for the following reason "Duplicate Question" by Tamim Shahriar Subeen 23 Jan, 15:36

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×380
×203

question asked: 22 Jan, 15:59

question was seen: 149 times

last updated: 23 Jan, 15:36