32 views3 pages

Document Summary

Hw3 will be posted today and is due in 10 days. - a company has a number (n) of employees. - each employee may have different hourly pay rate. - employees may work different number of hours per week. Write a program to read for each employee: hourly pay rate, hours worked per week. And compute: the gross pay for each employee, average hourly pay, average # hours work per week. - there is no string primitive data type in c. - strings are basically arrays of characters terminated by the null character. - null characters or string termination is "\0" - to initiliaze a string: a) char string1[]=string; -- notice that we have 6 characters plus the null sizeof(string1); b) char string2[]={"s","t","r","i","n","g","\0"}; 7: 6 characters + null c) to read a c-string from the user: scanf(%s,mystring); - notice that the array name is not having the & - because the array name, by definition, is a memory address.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents