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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!