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]
1 year 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]1 year 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
Which of the following statements are true about the growth of technology? Select 3 options.
love history [14]

Answer:

1. Currently, 67% of people on earth use at least one mobile device.

2. The general public began connecting to the Internet when the World Wide    Web was introduced in 1991.

3. By 1995, almost half of the world’s population was connected to the Internet.

Explanation:

I just took the test ;)

5 0
2 years ago
After deploying a large number of wireless laptop computers on the network, Taylor, the IT director at Contoso, Ltd. decides to
LenKa [72]

Answer:

Setting of short lease time for IP addresses in order to enhance quicker access from clients

6 0
2 years ago
A windows host sends a tcp segment with source port number 1200 and destination port number 25. the sending host is a(n) _______
tigry1 [53]
Email client as port 25 is the default port for an email server.
6 0
1 year ago
NEED ASAP!!
kow [346]

Answer:

because he needs to connect them all to the sane network (i think)

4 0
1 year ago
An online article in 2001 described a study in which twelve sixth-grade students who had not previously played chess participate
ipn [44]
Bdbxhdhdhdbxbdhdhxhxhdhdhdhdhdhdhdhdhdbdhdhdhdhdhdhrhrhrhrhrhdhdhdhdisisieiejjdidieieieieieiei
6 0
2 years ago
Other questions:
  • Rob creates a Course_Details table that has four columns: Course _ID, Course_Name, Semester and Credits. A course may have 0.5 c
    6·2 answers
  • Blender questions
    8·2 answers
  • Menus are attached to windows by calling the _____ method.
    8·1 answer
  • Using python,
    15·1 answer
  • A hotel salesperson enters sales in a text file. Each line contains the following, separated by semicolons: the name of the clie
    7·1 answer
  • How many times is the function wordScramble() called in the given program? public class WordScramble { public static void wordSc
    6·1 answer
  • #Write a function called string_finder. string_finder should #take two parameters: a target string and a search string. #The fun
    14·1 answer
  • Which is the correct notation to specify the following inheritance?
    8·1 answer
  • A large gambling company needs to be able to accept high volumes of customer wagers within short timeframes for high-profile spo
    9·1 answer
  • Doug grew up on a large farm in southwest Wisconsin. As a college graduation gift, Doug’s father gave him several hundred acres
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!