Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
401 views
in Arrays and Structures by (49.1k points)
closed by

For the following structure definition write the user defined function to accept data through keyboard. 

struct date{ int dd,mm,yy};

struct item {int item id;char name[10];float

price;date datemanif;}

1 Answer

+1 vote
by (54.8k points)
selected by
 
Best answer

void accept (item & i)

{

cout << “\n Enter the Item id”; cin > > i.id;

cout << “\n Enter the item name:”; cin >> i.name;

cout << “\n Enter the item price:”; cin >>i.price;

cout << “\n Enter the item manufacturing day:”; cin >> i.date.dd;

cout << “\n Enter the item manufacturing month:”; cin >> i.date.mm;

cout << “\n Enter the item manufacturing year:”; cin > > i.date.yy;

}

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

...