Question: Q7. a. Declare two functions: void func1(); void func2(); b. Implement/Create these two functions: Each will have two statements/lines of code: In the function func1,

Q7.

a. Declare two functions:

void func1();

void func2();

b. Implement/Create these two functions:

Each will have two statements/lines of code:

In the function func1, the first line prints the integer 1 and the second line just calls the function func2.

In the function func2, the first line prints the integer 2 and the second line just calls back the function func1.

c. Your main function should have just one statement/line of code: Just the call to func1, like below:

void main(){

func1();

}

d. Include on top for the printf statement.

Since you're calling one function from the other and back, does the code prints infinite 121212s just like in a loop?

Q8.

a. Declare a function like below:

int multiplyTwoIntegers(int integer1, int integer2);

b. Implement/Create the above function.

c. Call the above function from the main function like:

int firstInteger = 5;

int secondInteger = 6;

int multiplicationResult = multiplyTwoIntegers(firstInteger, secondInteger);

And Print the multiplicationResult.

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!