Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

10th Edition

0137916787, 978-0137916788

More Books

Students also viewed these Databases questions

Question

define EFFECTIVE PARTICIPATION

Answered: 1 week ago