answersLogoWhite

0


Best Answer

#include<stdio.h>

#include<conio.h>

#include<string.h>

#include<alloc.h>

void main()

{

int i=-1,j;

char ch='y';

struct emp

{

int eno;

char ename[30];

int salary;

};

struct emp *p;

clrscr();

p=(struct emp *)malloc(sizeof(struct emp));

while(ch=='y'ch=='Y')

{

i++;

printf("\nenter the employee id:-");

scanf("%d",&p[i].eno);

printf("\nenter the employee name:-");

scanf("%s",&p[i].ename);

printf("\nenter the salary:-");

scanf("%d",&p[i].salary);

printf("\ndo you want to continue(Y|N):-");

scanf("%s",&ch);

}

printf("\ninfromation about employees\n");

printf("employee id| employeename| salary");

printf("\n-----------|-------------|-------\n");

for(j=0;j<=i;j++)

{

printf("\n%d | %s | \%d",p[j].eno,p[j].ename,p[j].salary);

}

getch();

}

/*--------------------OUTPUT--------------

enter the employee id:-101

enter the employee name:-peersaab

enter the salary:-12000

do you want to continue(Y|N):-y

enter the employee id:-102

enter the employee name:-santosh

enter the salary:-15000

do you want to continue(Y|N):-n

infromation about employees

employee id| employeename| salary

-----------|-------------|-------

101 | peersaab | 12000

102 | santosh | 15000

*/

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

#include<iostream.h>

#include<conio.h>

#include<fstream.h>

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

If you're going to put your homework on answers.com, at least type the whole question. There's obviously some contextual information missing...

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a c program using data structure to accept the details of employees from user and display it on the screen using dynamic memory allocation?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Create a HTML page to display the information of student details?

student details example by html


How do you write a program to read set of numbers using by an array and display the ascending order of the given input numbers?

To write a C++ program to display the student details using class and array of object.


What is the C plus plus program to illustrate multiple inheritance for read and display student details with 3 test marks and average?

You can show multiple inheritance by inheriting student details like name ,Admission number ,Parents name, address and other information from a school class and then also inherit his marks detail from the his Class's class like Grade 3rd . You will get his marks information from there. Then go forward and make functions to calculate the average marks and display the details.


How do you design an If-Then statement or a flowchart with a single alternative decision structure that assigns 20 to the variable y and 40 to the variable z if the variable x is greater than 100?

Design an If-Then statement (or a flowchart with a single alternative decision structure) that assigns 0 to the variable b and assigns 1 to the variable c if the variable a is less than 10. Design an If-Then-Else statement (or a flowchart with a dual alternative decision structure) that assigns 0 to the variable b if the variable a is less than 10. Otherwise, it should assign 99 to the variable b. The following pseudocode contains several nested If-Then-Else statements. Unfortunately, it was written without proper alignment and indentation. Rewrite the code and use the proper conventions of alignment and indentation. If score &lt; 60 Then Display &quot;Your grade is F.&quot; Else If score &lt; 70 Then Display &quot;Your grade is D.&quot; Else If score &lt; 80 Then Display &quot;Your grade is C.&quot; Else If score &lt; 90 Then Display &quot;Your grade is B.&quot; Else Display &quot;Your grade is A.&quot; Design nested decision structures that perform the following: If amount1 is greater than 10 and amount2 is less than 100, display the greater of amount1 and amount2. Rewrite the following If-Then-Else If statement as a Select Case statement. If selection == 1 Then Display &quot;You selected A.&quot; Else If selection == 2 Then Display &quot;You selected 2.&quot; Else If selection == 3 Then Display &quot;You selected 3.&quot; Else If selection == 4 Then Display &quot;You selected 4.&quot; Else Display &quot;Not good with numbers, eh?&quot; End If Design an If-Then-Else statement (or a flowchart with a dual alternative decision structure) that displays “Speed is normal” if the speed variable is within the range of 24 to 56. If speed holds a value outside this range, display “Speed is abnormal.” Design an If-Then-Else statement (or a flowchart with a dual alternative decision structure) that determines whether the points variable is outside the range of 9 to 51. If the variable holds a value outside this range it should display “Invalid points.” Otherwise, it should display “Valid points.” Design a case structure that tests the month variable and does the following: If the month variable is set to 1, it displays “January has 31 days.” If the month variable is set to 2, it displays “February has 28 days.” If the month variable is set to 3, it displays “March has 31 days.” If the month variable is set to anything else, it displays “Invalid selection.” Write an If-Then statement that sets the variable hours to 10 when the flag variable minimum is set. End If End If End If End If


Write a c program to generate student mark details using union and find total and average and grade?

write a c program to display marks,total,average,grade using union

Related questions

How do you display matrix in c using dynamic memory allocation?

Memory allocation is not necessary to display a matrix.


Write a C program using dynamic memory allocation to find the sum of elements of a matrix?

Did you know that memory allocation is not needed to display the matrix? However, the C program is to find the sum of all the elements.


Create a HTML page to display the information of student details?

student details example by html


What is the value of a dale Earnhardt ritz cracker oreo display shelf worth?

This depends on your choice of display stand suppliers, as well as your display stand structure, materials, design requirements.


Display file and its structure in computer graphics?

A display file is a data structure used in computer graphics to represent the graphical elements that need to be displayed on a screen. Its structure typically includes information about various graphical entities such as points, lines, polygons, and their attributes. Here's a simplified description of the structure of a display file: 1**. Header Information:** Contains general information about the display file, such as the resolution of the screen, color depth, and other display-specific parameters. 2**. Primitive Information:** Represents the basic graphical entities to be displayed, including points, lines, and polygons. Each primitive entry includes details like coordinates, color, and other attributes. 3**. Attributes:** Specifies attributes for the primitives, such as color, line style, fill pattern, transparency, etc. These attributes determine the visual appearance of the primitives. 4.Transformation Matrices: Matrices used for transformations like translation, rotation, and scaling. Allow the modification of the position and size of graphical elements. Clipping Information: Describes the region of the screen that is currently visible or the clipping window. Helps in removing parts of primitives that are outside the visible area. Coordinate System Information: Defines the coordinate system used within the display file. Specifies the mapping of logical coordinates to physical screen coordinates. Hierarchy Information (Optional): If the display file represents a complex scene with a hierarchical structure, information about parent-child relationships and transformations might be included. Animation Information (Optional): If the display file is part of an animation, it may include details about the sequence and timing of frames. Overall, the display file serves as a structured representation of the graphical elements, their attributes, and the necessary information for rendering and displaying images on a computer screen. The specific details of a display file's structure may vary depending on the graphics system and its requirements.


Does every business owner have to display a labor law compliance poster for the employees to see?

According to the U.S. Department of Labor, all emplorers must display a labor law compliance poster somewhere in the workplace. Employees must be able to see this poster and understand his or her rights.


From the Views button on the Standard Buttons toolbar to display drives and folder in a list format?

Details


What kind of scanning uses ultrasonic technology with a display of both structure and motion with time?

Cardiovascular scanning is the correct answer. echocardiogram Real time scan- type of scanning that uses ultrasonic technology with a display of both structure and motion with time.


How do you hide your age on YouTube account?

My account &gt; Profile setup &gt; Personal details &gt; Age: Do not display my age


What are the steps to view the details about video driver files?

Device Manager&gt;Display Adapters&gt;*choose your video card*&gt;Properties&gt;Driver&gt; Click Driver Details for the finish -Chilltown


Is it required for any company to display the state minimun wage poster for employees to see?

The federal goverenment specifically addresses which companies must display the poster. This information can be obtained from the Department of Labors Website


What does crystal clear display mean?

Means the quality of the picture is not blurred or smoothed and details of the picture easy to see