World Languages, asked by anishasalvi22, 1 month ago

* Assignments based on Data Types and Operators:
(Hint: Do not accept input from user. Declare variables with default values)
1) Write a C Program to demonstrate the working of arithmetic operators (Associativity and
precedence of arithmetic operators is expected)

Answers

Answered by abhi5637095
5

Answer:

// C program to demonstrate

// working of binary arithmetic

// operators

#include <stdio.h>

int main()

{

int a = 10, b = 4, res;

// printing a and b

printf("a is %d and b is %d\n", a, b);

res = a + b; // addition

printf("a+b is %d\n", res);

res = a - b; // subtraction

printf("a-b is %d\n", res);

res = a * b; // multiplication

printf("a*b is %d\n", res);

res = a / b; // division

printf("a/b is %d\n", res);

res = a % b; // modulus

printf("a%%b is %d\n", res);

return 0;

}

Answered by naveenkumar47776
0

Answer:

Gates imfsjtstnxj vifl

Similar questions