Levels Tought:
Elementary,Middle School,High School,College,University,PHD
Teaching Since: | Apr 2017 |
Last Sign in: | 8 Weeks Ago, 4 Days Ago |
Questions Answered: | 4870 |
Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Two problems below, it giving me an issue to solve these questions in the visual studio. I need help to fix this practice problem?
1. Execute the following coding segment and identify the errors in the program. Debug the program and provide the correct version of the code. Note: The errors can be syntactical or logical.
2. Execute the following coding segment and identify the errors in the program. Debug the program and provide the correct version of the code. Note: The errors can be syntactical or logical.
Â
Â
#include <stdio.h> If employee structure definition
struct employee {
unsigned int age;
char gender;
double hourlySalary;
} int main(void) { employee empl; If define one struct employee variable If Store values in the emp1
emp1.age = 23;
emp1.gender = 'M';
emp1.hourlySalary = 13;
". ennui-age};
", emp1.gender);
", emp1.hourlySalary); printf{"%s%d\n", IIempl age is:
printf{"%s%c\n", "empl gender is
printF{"%s%.2FKn", IIemp1 hourly salary is: return EH
#include <5tdio.h> If employee structure definition
struct employee {
unsigned int age;
char gender;
double hourlySalary;
}; int mainflvoid) { employee empl; If define one struct employee variable If Store values in the empl
emp1.age = 23;
emp1.gender = X;
emp1.hourly5alary = 13; printf("%5%d\n"JI "emp1 age is:
printf("%5%c\n", "emp1 gender is
printf("%5%.2f\n", "empl hourly Salary is: , empl-agE)3
", emp1.gender);
", emp1.hourlySalary); return 3;
-----------