What output will be at Line X, Line Y and Line Z? #include #include #include #define

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

What output will be at Line X, Line Y and Line Z? #include #include #include #define

Post by answerhappygod »

What Output Will Be At Line X Line Y And Line Z Include Sys Types H Include Stdio H Include Unistd H Define 1
What Output Will Be At Line X Line Y And Line Z Include Sys Types H Include Stdio H Include Unistd H Define 1 (143.01 KiB) Viewed 26 times
What Output Will Be At Line X Line Y And Line Z Include Sys Types H Include Stdio H Include Unistd H Define 2
What Output Will Be At Line X Line Y And Line Z Include Sys Types H Include Stdio H Include Unistd H Define 2 (92.01 KiB) Viewed 26 times
Please answer asap.operating system
What output will be at Line X, Line Y and Line Z? #include <sys/types.h> #include <stdio.h> #include <unistd.h> #define SIZE 4 int nums[SIZE] = {-6, 12, -18, 24); int main() { int i; pi_t pid fork(); if (pid == 0) { for (i = 0; i < SIZE; i++) { nums = nums* i-8; = printf("CHILD: %d ",nums); /* LINE X */ pi_t pid_1= fork(); if(pid_1= = 0){ for (i = 0; i < SIZE; i++) { nums *= i+4; printf("CHILD: %d ", nums); /* LINE Y */ } else if (pid > 0) { wait(NULL); for (i = 0; i < SIZE; i++){ nums + = 4i; printf("PARENT: %d ",nums); /* LINE Z*/} } return 0; } } }
a. False What resources are used when a thread is created? How do they differ from those used when a process is created? [2] Explain the role of the init (or systemd) process on UNIX and Linux systems in regard to process termination. [2]
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply