Question
Write a C program that will do the following: 1.Declare four integers variables. intVar1, intVar2, intVar3,and intVar4. 2. Initialize intVar1 to the value 4; initialize
Write a C program that will do the following:
1.Declare four integers variables. intVar1, intVar2, intVar3,and intVar4.
2. Initialize intVar1 to the value 4; initialize intVar2to the value 5.
3. Declare four more integer variables. exp1, exp2,exp3, and exp4.
4. Declare a character variable charVar.
5. Assign the value of each expression below to variables exp1and exp2 respectively:
exp1= intVar1 + ((5 * intVar2) / (3 * intVar1));
exp2 = intVar1 + (5 * (intVar2 / 3)) * intVar1;
6. Using the fprintf()function, print to standard output the values of the variables (your output should look like the following):
intVar1= 4 and intVar2 = 5
Expression values are: exp1 = 6 exp2 = 24
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started