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
A(n) _____ is the unit of network information NICs and switches work with.
morpeh [17]

Answer: Network card

Explanation:

 A network card is unit of the network information NIC (Network interface card) and worked with the switches. The working is basically perform at the given physical layer and subsequently organizing different types of devices that are physically associated together to execute as individual unit.  

The network interface card (NIC) is also known as network adapter and the ethernet card in the network. It is the expansion of the card that basically enable the computer system to connect with the networks.

7 0
3 years ago
Using web-safe fonts and colors is something you can do to increase blank
Lostsunrise [7]

Using web-safe fonts and colors is something you can do to increase user experience and reliability when creating a web app by ensuring compatibility.

<h3>What are web-safe fonts and colors?</h3>
  • Fonts and colors are considered web-safe when they are included in the basic installation of web browsers.
  • What this means is that these fonts and colors come preinstalled in browsers.
  • This ensured compatibility leads to increased reliability.
  • Having a reliable web app improves user experience and makes for a more successful application.

Therefore, given that web-safe fonts and colors are just those that come preinstalled in most web browsers, using these during the development of your web app will ensure that most users will not have any issues. This increases reliability and improves the user experience.

To learn more about web fonts visit:

brainly.com/question/14450275?referrer=searchResults

7 0
3 years ago
How do you ask brainy a question without it not liking the question and saying it hurts their feelings?
murzikaleks [220]
IM SORRY but i dont now your question

7 0
3 years ago
Hiiiiiiiiiiiiiiiiiiiiiiiii
Olenka [21]

Answer:

hi

Explanation:

hi

5 0
3 years ago
Read 2 more answers
What does it mean if you tell a judge you are “taking the fifth”?
ziro4ka [17]
The fifth amendment states that “no person shall be compelled in any criminal case to be a witness against himself.”
5 0
4 years ago
Other questions:
  • "A Windows laptop is being used by a teacher in an outdoor (but protected by an overhang) setting. What setting would ensure tha
    5·1 answer
  • What is an activity that can help you enhance the appearance of your computer’s desktop?
    12·2 answers
  • Vlad is the leader of a group; he receives most of the messages from the group members, and he provides most of the information
    6·1 answer
  • What is the most common drive letter where window stores most data and programs. 1,a 2,b 3,c 4,e
    9·1 answer
  • Janice is making her resume in which section should she include information about her previous employers , positions held , and
    15·1 answer
  • Tina has made a database table in access containing field name class roll number and contact number she has set primary key for
    5·1 answer
  • As a general rule, what is the size of a brochure?
    11·1 answer
  • What did Adam and Eve look like?
    7·2 answers
  • 5.2
    8·1 answer
  • What is the complete path and filename of the file where ports and their associated protocols are defined
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!