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

Practice Questions On Arithmetic Operators and Typeconversion

Uploaded by

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

Practice Questions On Arithmetic Operators and Typeconversion

Uploaded by

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

Q1.

Write a C program that takes two integers from the user and performs a combination of arithmetic
operations. Compute the result of:

Result=(a+b)×(a−b)

Q2. Write a program that takes five numbers as input and calculates their average

Q3. Write a program to find power raised to the base number using pow() function

Note: Include <math.io> library in header file

Q4. Write a program to swap two numbers using arithmetic operators (without using third variable)

Q5. Write a C program to print the ASCII value of a given character(take input from user)

Q6. Write a C program that takes two integers from the user and divides them. Perform explicit type
conversion to display the result as a floating-point number.

Q7. Write a program that takes a character from the user and prints its corresponding ASCII value using
type conversion.

Q8. Write a program to take two characters as input, convert them to their ASCII values, and print their
sum.

NOTE: Please try to do it by yourself

You might also like