0% found this document useful (0 votes)
4 views

Assignment 3 Operators & Expression

The document outlines an assignment consisting of various programming tasks in C. These tasks include basic arithmetic operations, area calculations, data conversions, and conditional statements. The assignment aims to enhance understanding of operators and expressions in programming.

Uploaded by

Rutveg Chaudhari
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Assignment 3 Operators & Expression

The document outlines an assignment consisting of various programming tasks in C. These tasks include basic arithmetic operations, area calculations, data conversions, and conditional statements. The assignment aims to enhance understanding of operators and expressions in programming.

Uploaded by

Rutveg Chaudhari
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Assignment 3: Operators & Expression

___________________________________________________________

1. Write a program to perform addition, subtraction, multiplication and division between


two numbers.
2. Write a c program to find the area of the right angle triangle.
3. Write a program to swap two numbers with and without using a temporary variable.
4. Write a c program to input the value of rupees and convert into paisa.
5. Write a c program to input the distance traveled by a car and the time taken. Display its
speed.
6. Write a program that takes distance in inches and prints the corresponding value in cms.
(Note that 1 inch = 2.54 cm)
7. Write a c program to shift the given data by two bits to the left.
8. Write a c program to perform multiplication of given number with two without using *
operator.
9. Write a c program to read age as input. If age>18 then print “you can vote” else “you are
not eligible to vote” using ternary operator.
10. Write a c program to print the storage sizes of int, char and float data types.
11. Write a program to input the value of 4 variables a, b, c and d. Compute the resultant
value of the following expressions:
a. (a+b) * (c /d)
b. (a + b) * c / d
c. a+(b*c) / d

You might also like