0% found this document useful (0 votes)
5 views1 page

C Programming Exercises for Beginners

The document outlines a series of exercises for learning C programming, focusing on simple statements and expressions. Tasks include printing personal information, reading user input, simulating exchanges of money, calculating wages, swapping values, and working with complex numbers. It emphasizes the use of basic C functions and operations to complete these exercises.

Uploaded by

knvasanth40
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

C Programming Exercises for Beginners

The document outlines a series of exercises for learning C programming, focusing on simple statements and expressions. Tasks include printing personal information, reading user input, simulating exchanges of money, calculating wages, swapping values, and working with complex numbers. It emphasizes the use of basic C functions and operations to complete these exercises.

Uploaded by

knvasanth40
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

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:

You might also like