answersLogoWhite

0

#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

12y ago

What else can I help you with?

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.


What control in the oscilloscope that used to sharpen or control the display?

The control used to sharpen or enhance the display on an oscilloscope is typically the &quot;Focus&quot; knob. This knob adjusts the sharpness of the waveform display, allowing for clearer visibility of the signal details. Additionally, the &quot;Intensity&quot; control can be used to adjust the brightness of the trace, improving overall visibility. Together, these controls help ensure accurate readings and analysis of the waveform.


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

Related Questions

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

Memory allocation is not necessary to display a matrix.


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

student details example by html


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.


How do you show table or column contents using the MySQL commands?

To show the contents of a table in MySQL, you can use the SELECT statement. For example, to display all columns from a table named employees, you would run the command SELECT * FROM employees;. If you want to show specific columns, you can specify them, like SELECT first_name, last_name FROM employees;. To view the structure of a table, you can use DESCRIBE table_name; or SHOW COLUMNS FROM table_name;.


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.


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.


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

Details


Display file and its structure in computer graphics?

In computer graphics, a display file is a data structure that contains information about the objects to be displayed on the screen. This information typically includes geometric data such as vertices and edges, as well as attributes like color and texture. The structure of a display file can vary depending on the specific graphics system or software being used, but it generally organizes the data in a way that allows for efficient rendering and manipulation of the displayed objects.


What animal does not display segmentation?

Jellyfish do not display segmentation. They have a simple, non-segmented body structure compared to other animals like earthworms or insects.


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


How can employees navigate the display of religious symbols at work to ensure inclusivity and respect for diverse beliefs?

Employees can navigate the display of religious symbols at work by being respectful of diverse beliefs, understanding company policies regarding religious expression, and engaging in open and respectful communication with colleagues and supervisors to ensure inclusivity for all.


How do you hide your age on YouTube account?

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