C

C Program to Compute Quotient and Remainder

Program to Compute Quotient and Remainder Output Enter dividend: 25 Enter divisor: 4 Quotient = 6 Remainder = 1 In this program, the user is asked to enter two integers (dividend and divisor). They are stored in variables dividend and divisor respectively. Then the quotient is evaluated using / (the division operator), and stored in quotient. Similarly, the remainder is evaluated using % (the…

C

C Program to Find ASCII Value of a Character

In this example, you will learn how to find the ASCII value of a character. in C programming, a character variable holds ASCII value (an integer number between 0 and 127) rather than that character itself. This integer value is the ASCII code of the character. For example, the ASCII value of ‘A’ is 65. What this…

C

C Program to Multiply Two Floating-Point Numbers

Program to Multiply Two Numbers Output In this program, the user is asked to enter two numbers which are stored in variables a and b respectively. Then, the product of a and b is evaluated and the result is stored in product. Finally, product is displayed on the screen using printf(). Notice that, the result is rounded off to the second decimal place using %.2lf conversion character.

C

C Program to Add Two Integers

Program to Add Two Integers Output Enter two integers: 12 11 12 + 11 = 23 In this program, the user is asked to enter two integers. These two integers are stored in variables number1 and number2 respectively. Then, these two numbers are added using the + operator, and the result is stored in the sum variable. Finally, the printf() function is used to display…