CS220 Homework 2 Due Feb. 12, 2016 Name: 1. Given the following code: int x = -5; int y = x/2; int z = x>>1; a. Will "y" and "z" have the same value? If so, why? If not, why not? b. Is the statement "shifting to the right is the same as dividing by two" correct? 2. Is there anything wrong with the following code? If so, what is the problem? int main(int argc,char **argv) { int x; x=getFirst(23); if (x==12) return 1; return 0; } int getFirst(int st) { return (st*124639 % 332167); } 3. Given the following Code: int x; x=14; x=x++; What will the value of "x" be after the code is executed? Why? 4. Given the following invocation of a commmand generated from C code: ./mycmd this is a test What will be the values of: a. argc b. argv[1] 5. Given the following C code: int x=atoi(argv[1]); int y=(x | (-1-x)); if (y==-1) printf("Does OR act the same as ADD?\n"); Is there any value of x for which you will NOT print "Does OR act the same as ADD?"? If so, what is that value?