Answered step by step
Verified Expert Solution
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
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