1. The next step is ISA (Instruction Set Architecture ). ISA is used to translate the program into particular instruction for the computer that will be used to carry out the work of the program.2. int birth_year float height printf ( “Enter your birth year:\n” ) scanf ( “%d” , &birth_year ) printf ( “Enter your height ( in meters ):\n” ) scanf ( “%f” , &height ) printf ( “Your birth year is %d\n” , birth_year ) printf ( “Your height is %f\n” , height)3. a) 0x577C b) 0x444C c) 0xEDBA d) 0x1230 e) 0x04024. a) x>0 x>1 b) True5. a) 5 4 3 2 1 0 0 b) 4 7 10 c) 1*1 = 1 2*2 = 46. a) n n p pb) OR c) A B OUT 0 0 1 0 1 1 1 0 1 1 1 07. a) b) /* * * Factorial!: Computes the factorial of a positive integer * */ #include <stdio.h> int main(){ /* Initialization */ int factorial; /* input to be entered by the user */ int result; /* result, factorial! */ printf("Please enter a number: "); scanf("%d", &factorial); while((factorial < 0) || (factorial > (2^32 - 1)) { printf("Please enter a number again: "); scanf("%d", &factorial); } /* Compute factorial */ result = 1; while(factorial > 0) { result *= factorial; factorial--; } /* Print the answer */ printf("%d\n", result); return 0; } 8. a) Compute integer/2, and determine whether the remainder equals 0. b)c) /* * * Determine whether or not a positive integer d < 2^31 is a power of 2 * */ #include <stdio.h> int main() { /* Initialization */ int factorial; /* input to be entered by the user */ int result; /* result, factorial! */ printf("Please enter a number: "); scanf("%d", &integer); while((integer < 0) || (integer > (2^31)) { printf("Please enter a number again: "); scanf("%d", &integer); } result = integer % 2; if(result = 0) { printf(“ The integer is the power of 2”) } else { printf(“ The integer is not the power of 2”) } return 0;
View Full Document