1answer.
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]
3 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]3 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
WHO WANTS TO PLAY AMONG US
Elza [17]

Answer:

Explanation:

ME

8 0
3 years ago
Read 2 more answers
I'm trying to export a video with HitFilm Express, I am either unable to click the export button or it gets to 43% and just stop
fiasKO [112]

Answer:

Yea I am also confused oof

8 0
3 years ago
What is the difference between technology and science?
Anna007 [38]

Answer:

The difference between science and technology can be summarized in the following manner:

Science is more or less a study of a particular branch namely, physics, chemistry or biology. ...

Science involves observation and experimentation whereas technology involves invention and production.

Science is all about analysis whereas technology is more concerned about the synthesis of design.

Explanation:

cool

3 0
3 years ago
To what extent do preexisting personal biases affect representation in new media
dolphi86 [110]

Answer:

Below

Explanation:

I believe that it's a bit of a case by case scenario. However, personal biases will inevitably show throughout any sort of writing or other presenting within media. That's why you should always be careful about what you read and believe is true

6 0
2 years ago
When was the GoPro camera invented?​
masya89 [10]

Answer:

2002

Explanation:

Please mark me brainliest :)

6 0
3 years ago
Other questions:
  • HURRY
    5·1 answer
  • A(n) file management system is a program that allows the creation of individual database tables, each of which is stored in its
    5·1 answer
  • ​In addition to joint application development, another popular user-oriented method is _____, which resembles a condensed versio
    14·1 answer
  • _____________ describes the abstraction of web-based computers, resources, and services that system developers can utilize to im
    9·1 answer
  • " In which software generation did the distinction between systems programmers and other programmers first surface?"
    15·1 answer
  • Why are online payment services necessary?
    10·2 answers
  • Which term is used in object-oriented programming to reference characteristics of an object?
    15·1 answer
  • Choose the true statement below. (html)
    5·1 answer
  • Suggest three ways in which celebrating an occasion influences food choices?
    10·2 answers
  • How would you assign roles to your group members?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!