Questions: 1 978

Answers by our Experts: 1 850

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 & Filtering

Consider the following declaration and the statements (a) to (d) written in C. Identify the statement which are correct and the ones which has an error, by giving reason. If a statement has an error correct it.

int c = 1, *pc; // declaration

(a) pc = c;

(b) *pc = &c;

(c) pc = &c;

(d) *pc = c; 


Write short answers for each of the following:

(a) Name the operator that is used to declare a pointer variable.

(b) If pt is an integer pointer variable, what is the value that this pointer variable can have? (c) List the three values that can be used to initialize a pointer variable.

(d) Name and give the symbol of the operator that returns the location in memory where its operand is stored.


Is It You, Cody?


by CodeChum Admin



Can you identify if Cody's name is spelled right? If so, then make a program that accepts four one-letter strings separated by space and print "Correct" if the inputted strings, combined in order, spell the name Cody correctly. If not, print "Wrong". It doesn't matter if it's in uppercase or lowercase, as long as it's spelled correctly, it's considered correct.

Suppose binary search technique is applied to the array NAME (Allen, Clark, Dickens, Edwards, Goodman, Hobbs, Irwin, Klein, Lewis, Morgon, Richard, Scott, Tucker, Walton) . Find the ends BEG and END and middle MID for the rest segment in each step of an algorithm

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. 


Write a program that will predict the size of a population of red ants. The



program should ask the user for the starting number of red ants e.g. 2,000,000,



their average daily population increase as a percentage of current population



e.g., 5%, and the number of days they will multiply e.g. 10 days. Use a do while



to display the size of the population for each day.



Draw a flow chart and write down a pseudo code before attempting this



number.



Input Validation:



Do not accept a number less than two for the starting size of the population.



Do not accept a negative number for average daily population increase.



Do not accept a number less than one for the number of days they will



multiply.


  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 )


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS