Course Solutions Uncategorized (Solved) : First Question 1 Given C Code Would Address Space Contain Areas Int Y 9 Global Variable In Q31819554 . . . .

(Solved) : First Question 1 Given C Code Would Address Space Contain Areas Int Y 9 Global Variable In Q31819554 . . . .

 

first question

1) Given the C code below, what would the address spacecontain in each of its areas?

int y = 9; // Global variable
int fun()  
{
    int x = 1;
    for (int i = 0; i        if (x % 2 ==0)
            x++;

    return y;
}

second question :

2 )The code below invokes the System Callwait(), what is its purpose?

short pid;if ((pid = fork()) == 0) { /* some code is here */ exit(n);} else { int Attribute; while(pid != wait(&Attribute));}

3 ) Third question :

In the system call:

execl(“/home/primes”, “primes”, “700”, 0);

Where would the parameter 700 be stored in the child’s addressspace?

Expert Answer


An answer will

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post