hello can you helo i am hena please if you can help me to solve this project
project :
1. Consider the C-like code below. What values do the last three lines print out? If its printing an address, tell me what variables address it is printing. Assume that the print statement does what youd expect - it prints out the value of the address or variable after it.
int p[20];
for (i=0; i<20; i++)
{p = i;}
int *mypointer = &p[0];
print *mypointer;
print p;
print p[3];
2. Processor P1 has a 1GHz clock, and processor P2 has a 2GHz clock. They have completely different instruction sets, but they both execute exactly 1 instruction per cycle. Which processor has better performance and why? You must explain your answer to get credit.
3. Write a MIPS assembly program that reads a string of integers and computes whether it (the number represented by the entire string) is prime or not. Assume the string of integers has no more than 5 digits.
4. Write a MIPS assembly program that sorts, in ascending order, all of the characters that are provided as inputs (sorting is done by ASCII code). Assume you wont get more than 100 characters. Some inputs may repeat. The pseudo-code for your program is below.
project :
1. Consider the C-like code below. What values do the last three lines print out? If its printing an address, tell me what variables address it is printing. Assume that the print statement does what youd expect - it prints out the value of the address or variable after it.
int p[20];
for (i=0; i<20; i++)
{p = i;}
int *mypointer = &p[0];
print *mypointer;
print p;
print p[3];
2. Processor P1 has a 1GHz clock, and processor P2 has a 2GHz clock. They have completely different instruction sets, but they both execute exactly 1 instruction per cycle. Which processor has better performance and why? You must explain your answer to get credit.
3. Write a MIPS assembly program that reads a string of integers and computes whether it (the number represented by the entire string) is prime or not. Assume the string of integers has no more than 5 digits.
4. Write a MIPS assembly program that sorts, in ascending order, all of the characters that are provided as inputs (sorting is done by ASCII code). Assume you wont get more than 100 characters. Some inputs may repeat. The pseudo-code for your program is below.