Exercise 2 C Programming using Simple statements and expressions
1. Print your name, I am an Engineer. Sample: My name is Sivaji, I am an
Engineer. Get familiar with vi, cc, and ./[Link].
2. Print your details Name, age, Gender (M/F), Address, CutOff (in HSC) with
one detail per line and tab between label and value.
3. Read your details through keyboard and display them. (Use gets() for
string).
4. Kumar has Rs.x and Sheela has Rs.y. Both exchange their amounts.
Simulate this as an interactive C program.
5. Calculate the daily wage of a labour taking into account the pay per day,
number of hours worked, TA, and DA.
6. Box 1 has M apples and Box 2 has N apples. Assuming you do not have any
other space/storage to hold the apples, exchange the apples in Box 1 and
Box 2. (Swap without temp).
7. Display the sum of ASCII values of vowels in English letters.
8. Read a complex number. Display the number in the format a+ib. and
calculate its modulus value as the square root of the sum of squares of a and
b. (Use sqrt, pow functions)
Program: