SlideShare a Scribd company logo
Write a program in C++ that declares a structure to store the code number, salary and grade of an
employee. The program defines two structures variables, inputs records of two employees and
then displays the record of the employees.
Solution
#include
#include
using namespace std;
struct employee
{
int codenumber[7];
char grade[14];
float salary;
};
int main(void)
{
struct employee ;
cout<<' .......................................: " ;
cout<<" enter the employee code number: " ;
gets(employee.codenumber);
cout<<" enter the employee grade: " ;
gets(employee.grade);
cout<<" enter the employee salary: " ;
gets(employee.salary);
return (employee);
}
int list_function(employee list)
{
cout<<" employee codenumber: " <

More Related Content

More from fathimalinks (20)

PDF
This is question about excel cuers wish to answer shortly how to use.pdf
fathimalinks
 
PDF
There is a requirement to design a system to sense the presence of gl.pdf
fathimalinks
 
PDF
The investments of Charger Inc. include a single investment 11,010 .pdf
fathimalinks
 
PDF
RNA polymerasebinds to DNA after the double strands have been unwoun.pdf
fathimalinks
 
PDF
Research and explain the deviant actions of the Los Angeles Police D.pdf
fathimalinks
 
PDF
Question 1 10 points Save A TALIA Contribute NINA Co Contribute TALIA.pdf
fathimalinks
 
PDF
Q1. Print all the odd numbers from 1 to a user specifiable upper lim.pdf
fathimalinks
 
PDF
Please revise the answer bellow.Q1. What historically have been Ap.pdf
fathimalinks
 
PDF
Negligence Curtis R. Wilhelm owned beehives and kept the hives on pr.pdf
fathimalinks
 
PDF
List and explain at least three popular sixteenth century dance type.pdf
fathimalinks
 
PDF
Introduction to Database Management SystemConsider the following .pdf
fathimalinks
 
PDF
In female mammals, one of the X chromosomes in each cell is condensed.pdf
fathimalinks
 
PDF
imonene, a compound synthesized by plants, is sequestered by butterf.pdf
fathimalinks
 
PDF
If every cell and tissue in the body can potentially see or be ex.pdf
fathimalinks
 
PDF
How would you write think funcion in C programWrite a function .pdf
fathimalinks
 
PDF
Gutenbergs Revolution has been compared to the Internet Revolution.pdf
fathimalinks
 
PDF
Help if you can Genetics question. thanks beforehand! You continue y.pdf
fathimalinks
 
PDF
From the water what is the zonation of the typical mangrove ecosyst.pdf
fathimalinks
 
PDF
find the ordinal position of 623SolutionA place or rank, like .pdf
fathimalinks
 
PDF
Each of the following diagrams represents cells from an animal with .pdf
fathimalinks
 
This is question about excel cuers wish to answer shortly how to use.pdf
fathimalinks
 
There is a requirement to design a system to sense the presence of gl.pdf
fathimalinks
 
The investments of Charger Inc. include a single investment 11,010 .pdf
fathimalinks
 
RNA polymerasebinds to DNA after the double strands have been unwoun.pdf
fathimalinks
 
Research and explain the deviant actions of the Los Angeles Police D.pdf
fathimalinks
 
Question 1 10 points Save A TALIA Contribute NINA Co Contribute TALIA.pdf
fathimalinks
 
Q1. Print all the odd numbers from 1 to a user specifiable upper lim.pdf
fathimalinks
 
Please revise the answer bellow.Q1. What historically have been Ap.pdf
fathimalinks
 
Negligence Curtis R. Wilhelm owned beehives and kept the hives on pr.pdf
fathimalinks
 
List and explain at least three popular sixteenth century dance type.pdf
fathimalinks
 
Introduction to Database Management SystemConsider the following .pdf
fathimalinks
 
In female mammals, one of the X chromosomes in each cell is condensed.pdf
fathimalinks
 
imonene, a compound synthesized by plants, is sequestered by butterf.pdf
fathimalinks
 
If every cell and tissue in the body can potentially see or be ex.pdf
fathimalinks
 
How would you write think funcion in C programWrite a function .pdf
fathimalinks
 
Gutenbergs Revolution has been compared to the Internet Revolution.pdf
fathimalinks
 
Help if you can Genetics question. thanks beforehand! You continue y.pdf
fathimalinks
 
From the water what is the zonation of the typical mangrove ecosyst.pdf
fathimalinks
 
find the ordinal position of 623SolutionA place or rank, like .pdf
fathimalinks
 
Each of the following diagrams represents cells from an animal with .pdf
fathimalinks
 

Recently uploaded (20)

PPTX
Optimizing Cancer Screening With MCED Technologies: From Science to Practical...
i3 Health
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PPTX
SCHOOL-BASED SEXUAL HARASSMENT PREVENTION AND RESPONSE WORKSHOP
komlalokoe
 
PPTX
How to Configure Lost Reasons in Odoo 18 CRM
Celine George
 
PPTX
How to Configure Storno Accounting in Odoo 18 Accounting
Celine George
 
PPTX
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
PDF
community health nursing question paper 2.pdf
Prince kumar
 
PPTX
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 
PDF
The-Beginnings-of-Indian-Civilisation.pdf/6th class new ncert social/by k san...
Sandeep Swamy
 
PDF
1, 2, 3… E MAIS UM CICLO CHEGA AO FIM!.pdf
Colégio Santa Teresinha
 
PPTX
Latest Features in Odoo 18 - Odoo slides
Celine George
 
PPTX
Accounting Skills Paper-I, Preparation of Vouchers
Dr. Sushil Bansode
 
PPTX
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PPTX
Capitol Doctoral Presentation -July 2025.pptx
CapitolTechU
 
PPTX
How to Configure Access Rights of Manufacturing Orders in Odoo 18 Manufacturing
Celine George
 
PPTX
Views on Education of Indian Thinkers J.Krishnamurthy..pptx
ShrutiMahanta1
 
PPTX
How to Configure Prepayments in Odoo 18 Sales
Celine George
 
PPT
digestive system for Pharm d I year HAP
rekhapositivity
 
PPTX
Nutri-QUIZ-Bee-Elementary.pptx...................
ferdinandsanbuenaven
 
Optimizing Cancer Screening With MCED Technologies: From Science to Practical...
i3 Health
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
SCHOOL-BASED SEXUAL HARASSMENT PREVENTION AND RESPONSE WORKSHOP
komlalokoe
 
How to Configure Lost Reasons in Odoo 18 CRM
Celine George
 
How to Configure Storno Accounting in Odoo 18 Accounting
Celine George
 
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
community health nursing question paper 2.pdf
Prince kumar
 
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 
The-Beginnings-of-Indian-Civilisation.pdf/6th class new ncert social/by k san...
Sandeep Swamy
 
1, 2, 3… E MAIS UM CICLO CHEGA AO FIM!.pdf
Colégio Santa Teresinha
 
Latest Features in Odoo 18 - Odoo slides
Celine George
 
Accounting Skills Paper-I, Preparation of Vouchers
Dr. Sushil Bansode
 
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
Capitol Doctoral Presentation -July 2025.pptx
CapitolTechU
 
How to Configure Access Rights of Manufacturing Orders in Odoo 18 Manufacturing
Celine George
 
Views on Education of Indian Thinkers J.Krishnamurthy..pptx
ShrutiMahanta1
 
How to Configure Prepayments in Odoo 18 Sales
Celine George
 
digestive system for Pharm d I year HAP
rekhapositivity
 
Nutri-QUIZ-Bee-Elementary.pptx...................
ferdinandsanbuenaven
 
Ad

Write a program in C++ that declares a structure to store the code n.pdf

  • 1. Write a program in C++ that declares a structure to store the code number, salary and grade of an employee. The program defines two structures variables, inputs records of two employees and then displays the record of the employees. Solution #include #include using namespace std; struct employee { int codenumber[7]; char grade[14]; float salary; }; int main(void) { struct employee ; cout<<' .......................................: " ; cout<<" enter the employee code number: " ; gets(employee.codenumber); cout<<" enter the employee grade: " ; gets(employee.grade); cout<<" enter the employee salary: " ; gets(employee.salary); return (employee); } int list_function(employee list) { cout<<" employee codenumber: " <