Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2.1. What will be the output of the following code #define TRIPPLE(x) (3*x) int x = 4; printf(triple(%d) = %d ,x+1, TRIPPLE(x+1)); a. triple(5) =

2.1. What will be the output of the following code

#define TRIPPLE(x) (3*x)

int x = 4;

printf(triple(%d) = %d ,x+1, TRIPPLE(x+1));

a. triple(5) = 12

b. triple(5) = 13

c. triple(4) = 14

d. triple(4) = 15

e. none of the above

2.2. How many processes will be created by executing the following code:

int main() {

int cpid = 0;

cpid = fork();

cpid = fork();

cpid = fork();

sleep(10);

return(0);

}

a. 3

b. 5

c. 6

d. 8

e. none of the above

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

Advances In Databases 11th British National Conference On Databases Bncod 11 Keele Uk July 7 9 1993 Proceedings Lncs 696

Authors: Michael F. Worboys ,Anna F. Grundy

1993rd Edition

3540569219, 978-3540569213

More Books

Students also viewed these Databases questions

Question

What is a use case, and what is its purpose? regarding databases

Answered: 1 week ago

Question

x-3+1, x23 Let f(x) = -*+3, * Answered: 1 week ago

Answered: 1 week ago