Answer:
This is the complete correct program:
#include <stdio.h>
#include<sys/types.h>
#include<unistd.h>
int value = 128;
int main()
{
pid_t pid;
pid=fork();
if (pid==0) /* child process */
{
value +=8;
return 0; }
else if (pid > 0) {/* parent process */
wait (NULL);
printf ("PARENT: value =%d\n" ,value); /* LINEA */
return 0;
}
}
The output of the LINE A is:
PARENT: value = 128
Explanation:
The fork() function used in the program creates a new process and this process is the child process. The child process is same as the original process having its own address space or memory.
In the child process the value of pid is 0. So the if condition checks if pid==0. Then the child process adds 8 to the value of its variable according to the following statement
value +=8;
Now the original process has value = 128. In else if part the parents process has the value of pid greater than zero and this portion of the program is of the parent process :
else if (pid > 0)
{ wait (NULL);
printf ("PARENT: value =%d\n" ,value);
return 0; }
So the value 128 is printed at the end in the output.
wait(NULL) is used to wait for the child process to terminate so the parent process waits untill child process completes.
So the conclusion is that even if the value of the variable pid is changed in the child process but it will not affect the value in the variable of the parent process.
Answer:
the first conputer brought in nepal was IBM 1401
Answer:
See explaination
See explaination
Explanation:
Binary coded decimal:
Binary coded decimal (BCD) is a system of writing numerals that assigns a four-digit binary code to each digit 0 through 9 in a decimal (base-10) numeral. The four-bit BCD code for any particular single base-10 digit is its representation in binary notation.
Go to attachment for the step by step solution.
The authorization services determine which resources a user can access along with the operations that a user can perform.
<h3>What is authorization service?</h3>
The authorization service makes sure the user has permission to access a certain resource. Role-based access control (RBAC) and list-based access control are two methods for authorizing (LBAC).
The process of granting anyone permission to use a resource is called authorization.
The description may sound bizarre, but there are numerous actual examples that may help you comprehend what authorization means and how to utilize it with computer systems.
Thus, the authorization services determine which resources a user can access along with the operations that a user can perform.
Learn more about the authorization services here:
brainly.com/question/10436962
#SPJ4