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

(Solved) : Int Values Stored Memory Cells Use 4 Bytes 32 Bits 23 4294967296 Possible Int Values Int V Q27305824 . . . .(Solved) : Int Values Stored Memory Cells Use 4 Bytes 32 Bits 23 4294967296 Possible Int Values Int V Q27305824 . . . .

<br/><img src="https://media.cheggcdn.com/media%2Fe7f%2Fe7fe6716-4794-4c7d-b9d8-f2b3f1bb6e59%2Fimage" alt="Because int values are stored in memory cells that use 4 bytes, which is 32 bits, there are only 23 4294967296 possible int values. So, an int variable