C Answers

Questions answered by Experts: 1 680

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

Suppose NAME is a 8 element array and 5 elements (Brown,Davis,Johnson,Smith,wagner)are in array observe that names are listed alphabetically and keep it alphabetical all times suppose ford and Taylor are added to the array and Davis removed from array

Consider the following declaration. For each of the following statements (a) to (f) write a


single statement to perform the indicated task.


float number1 = 7.3, number2;


(a) Declare the variable fPtr to be a pointer to an object of type float.


(b) Assign the address of variable number1 to pointer variable fPtr.


(c) Print the value of the object pointed to by fPtr together with a suitable message.


(d) Assign the value of the object pointed to by fPtr to the variable number2.


(e) Print the address of number1 together with a suitable message.


(f) Print the value stored in fPtr together with e suitable message


Write a program that computes and displays the charges for a patient’s hospital stay. First, the program should ask if the patient was admitted as an in-patient or an out-patient. If the patient was an in-patient the following data should be entered: i. The number of days spent in the hospital ii. The daily rate iii. Charges for hospital services (lab tests, etc.) iv. Hospital medication charges. If the patient was an out-patient the following data should be entered: i. Charges for hospital services (lab tests, etc.) ii. Hospital medication charges. The program should use two functions to calculate the total charges. One of the functions should accept arguments for the in-patient data, while the other function accepts arguments for out-patient data. Both functions should return the total charges. Input Validation: Do not accept negative numbers for any information. 


  1. Your task is to ask the user for a year and then call the isLeapYear function to check whether the year is a leap year or not.

3x4sin(180x) + 4x3 cos(90x) + x2sin(tan(45)) + 7x + 9cos(90x2 )


if your ids last digit is 0 then implement Bisection numerical method to find the root of the given equation.


if your ids last digit is 1/2/3 or even then implement False position numerical method to find the given equation.


if your ids last digit is 4/5/6 or even then implement secant numerical method to find the given equation.


if your ids last digit is 7/8/9 or even then implement newton raphson numerical method to find the given equation.



given equation:x^3-(last digit of your id)x+(ASCIIvalue of your names first letter)

an example :if my id is 110104154 then the last digit is 4

my name: Sanjida first letter S . ASCII of S=83 (cap letter only)

so equation for me is:x^3-(4)x+(83)

as last digit is 4 i have to choose secant method.

now find your and you need to describe your equationand method choosein your report as i shown here.


Design & Implement a C- program that can handle salesmen records of ABC Company. Each salesman has unique 4-digit id #, name, salary, monthly sale & commission (commission is computed depending on value of monthly sale). Net income of a salesman is salary plus commission. Make maximum use of user defined Functions. Conditions for calculating commission are as follows: ➢ Commission is 20% of monthly sale, if sale is equal to or greater than 15,000. ➢ Commission is 15% of monthly sale, if sale is equal to or greater than 10,000 and less than 15,000. ➢ Commission is 10% of monthly sale, if sale is equal to or greater than 8,000 and less than 10,000. ➢ Commission is 5% of monthly sale, if sale is equal to or greater than 5,000 and less than 8,000. ➢ No Commission, if sale is less than 5,000

Design & Implement a C- program that can handle salesmen records of ABC


Company. Each salesman has unique 4-digit id #, name, salary, monthly sale &


commission (commission is computed depending on value of monthly sale). Net


income of a salesman is salary plus commission. Make maximum use of user


defined Functions.


Conditions for calculating commission are as follows:


➢ Commission is 20% of monthly sale, if sale is equal to or greater than 15,000.


➢ Commission is 15% of monthly sale, if sale is equal to or greater than 10,000


and less than 15,000.


➢ Commission is 10% of monthly sale, if sale is equal to or greater than 8,000


and less than 10,000.


➢ Commission is 5% of monthly sale, if sale is equal to or greater than 5,000 and


less than 8,000.


➢ No Commission, if sale is less than 5,000.



Design & Implement a C- program that can handle salesmen records of ABC 

Company. Each salesman has unique 4-digit id #, name, salary, monthly sale & 

commission (commission is computed depending on value of monthly sale). Net 

income of a salesman is salary plus commission. Make maximum use of user 

defined Functions.

Conditions for calculating commission are as follows:

➢ Commission is 20% of monthly sale, if sale is equal to or greater than 15,000.

➢ Commission is 15% of monthly sale, if sale is equal to or greater than 10,000 

and less than 15,000.

➢ Commission is 10% of monthly sale, if sale is equal to or greater than 8,000 

and less than 10,000.

➢ Commission is 5% of monthly sale, if sale is equal to or greater than 5,000 and 

less than 8,000.

➢ No Commission, if sale is less than 5,000


Given an array A of N integers and two integers X and Y, find the number of integers in the array that are both less than or equal to X and divisible by Y

LATEST TUTORIALS
APPROVED BY CLIENTS