TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Md Nayeem
NA
75
23.9k
Where is the problem in this code?
Jan 16 2018 3:31 PM
#include <stdio.h>
struct
Bookinfo
{
char
[20] bname;
int
pages;
int
price;
}book[3];
int
main(
int
argc,
char
*argv[])
{
int
i;
for
(i=0;i<3;i++)
{
printf(
"\nEnter the Name of Book : "
);
gets(book[i].bname);
printf(
"\nEnter the Number of Pages : "
);
scanf(
"%d"
,book[i].pages);
printf(
"\nEnter the Price of Book : "
);
scanf(
"%f"
,book[i].price);
}
printf(
"\n--------- Book Details ------------ "
);
for
(i=0;i<3;i++)
{
printf(
"\nName of Book : %s"
,book[i].bname);
printf(
"\nNumber of Pages : %d"
,book[i].pages);
printf(
"\nPrice of Book : %f"
,book[i].price);
}
return
0;
}
Reply
Answers (
1
)
Program enter 5 Students & 5 marks & sum marks c++ console
Needs to create the Strong Name using CPP CLR VS 2010.