Download as rtf, pdf, or txt
Download as rtf, pdf, or txt
You are on page 1of 1

HW - Day2 (Lab assignment for day 1) 1. WAP to calculate the area of a circle.

The radius should be taken as input from the user. 2. Modify the avg_numbers program to print the deviations of each number from the avg and print the same. 3. WAP to calculate the volume of a cylinder. The length and the radius of the base will be input by the user. 4. WAP to calulate the diagonal of a rectangle. The length and breadth will be supplied by the user. [Hint: sqrt(num) is a function for calculating square root of 'num' and pow(num,p) is a function to calculate the 'num' to the power 'p'.] 5. Modify the variable_io program to scan all five inputs using a single scanf. Review Questions: 1. Identify the invalid names: _name, return, 1st number, number1, ret.value , len*bre, return_new, Zvar 2. What are the two different kinds of division that the / operator can do? Under what circumstances does it perform each? 3. What is meant by format specifier? Give example of different format specifiers used in C. 4. Discuss about different format specifiers

You might also like