answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
daser333 [38]
2 years ago
13

there is a structure called employee that holds information like employee code, name, date of joining. Write a program to create

an array of the structure and enter some data into it. Then ask the user to enter current date. Display the names of those employees whose service is 15 or more than 15 years according to the given current date.
Computers and Technology
1 answer:
Sever21 [200]2 years ago
3 0

Answer:

The program in C is as follows:

#include<stdio.h>

#include<conio.h>

struct employee{

char empname[50]; int empcode, day,mon,yr;

}employees[30];

int main(){

int total;

printf("Numbers of Employees : "); scanf("%d",&total);

for(int kt=0;kt<total;kt++){

printf("Employee Code : "); scanf("%d",&employees[kt].empcode);

printf("Name: "); scanf("%s",employees[kt].empname);

printf("Date of Joining [dd mm yyyy]: "); scanf("%d%d%d",&employees[kt].day,&employees[kt].mon,&employees[kt].yr); }

int year;

printf("\nCurrent Date [Year only]: "); scanf("%d", &year);

printf("Code\t\t\t Name\t\t\t Date of Joining\n");

for(int kt=0;kt<total;kt++)

if((year - employees[kt].yr) >= 15)

printf("%d\t\t\t %s\t\t\t %d/%d/%d\n",employees[kt].empcode,employees[kt].empname, employees[kt].day,employees[kt].mon,employees[kt].yr);

}

Explanation:

See attachment for explanation where comments were used to explain some lines

Download txt
You might be interested in
John works for Internal Computer Specialists, which focuses on helping small business owners resolve MIS infrastructure issues.
lisov135 [29]

Answer:

Hardware.

Explanation:

All electronics devices like computer servers, DVDs, smartphones and cell phones, wrist watches etc, comes with two main components, they are hardware and software.

The hardware components are the physical part of the device, while the software component is the written instructions configured to the hardware for executing tasks.

Cleaning the motherboard in a computer system, fixing a DVD, servicing other internal components of devices are all hardware maintenance and repair services.

6 0
2 years ago
Which type of utp cable is used to connect a pc to a switch port?
rodikova [14]
HDMI Cable, i think that's what it's called.
3 0
2 years ago
A student made a model of isostasy by placing a block of wood in a beaker of water. What does the wooden block represent in the
Komok [63]
I am almost positive the answer is B, Earth's crust. I know it cannot be A or C because isostasy has nothing to do with sea level or glaciers, and Earth's mantle is inside.
7 0
2 years ago
Read 2 more answers
Jannette has been experiencing slow performance on her computer. Today she received an error message saying that an update to he
Marysya12 [62]

Answer: ur never going to get your answer!!!!

ExpElanation: hahahahaha ( pls 5 star pls pls. Shhhh)

3 0
2 years ago
Read 2 more answers
Which of the following are recommended techniques for protecting computer files and data? Check all of the boxes that apply.
lara [203]
Hello <span>Pouerietzach


Question: </span><span>Which of the following are recommended techniques for protecting computer files and data? Check all of the boxes that apply.
</span><span>
Answer: A, B, D, E, G

Hope That Helps
-Chris</span>
5 0
2 years ago
Read 2 more answers
Other questions:
  • Jefferson is interested in starting his own business. He plans to borrow money from the local bank in order to finance the busin
    9·2 answers
  • ________ is free software created and updated by a worldwide community of programmers. office software a web service cloud-based
    9·1 answer
  • Discuss how the user-designer communications gap can cause a good project to go bad.
    8·1 answer
  • The most direct way for Jonathan to gain on-the-job experience and earn money while attending school is to apply for:
    5·2 answers
  • Thomas has signed a deal with a production house that allows them to use his images on their website. What is required when imag
    5·2 answers
  • A shipping company uses the following function to calculate the cost in dollars of shipping based on the weight of the package (
    6·1 answer
  • A bank in your town updates its customers’ accounts at the end of each month. The bank offers two types of accounts: savings and
    8·1 answer
  • A computer application such as Microsoft Access that is used to store data and convert it into information is a ________________
    6·1 answer
  • Two devices are connected to the Internet and communicating with one another. A squirrel chews through one of the wires in the n
    6·1 answer
  • Write code which takes a sentence as an input from the user and then prints the length of the first word in that sentence.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!