Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

based systems .a) Characters and numbers are represented by 32 bit binary code i

ID: 3877967 • Letter: B

Question

based systems .a) Characters and numbers are represented by 32 bit binary code in present day C b) %f specifies integer variables c) Operating System programs are contained in system Random Access d) Division operation has lower priority over addition operation Read Write Memory .e) Loader converts the higher level language to machine code ,f) in C language, variables can be declared before preprocessor directives, for convenience QUESTION 2Answer the following clearly: .(a ) Variables num 1-56, num2s 12, num 3-78, num31, sum 12, sum34, dif12 and dif34 are all integers; Variables idiv12, idiv34 are integers and fdiv12, fdiv34 are floating point. Using same values for num1, what are the values of idiv12 and fdiv34[ to second decimal accuracy]? num2, num3, num4 idiv12 = (num1/num2) idiv34 = (num3/num4); fdiv12 (float) num1/num2; fdiv34 = (float) num3/num4 ajidiv12- fdiv34 (b) Which is more accurate value idiv12 or fdiv34? Why? Which is more faster computation? (b) Which is more accurate why. Which is more faster--- Why-- Are the following statements valid? If not what is missing? Assume variables are already defined. c) scanf ("%d%d", num1, num2) If invalid, what is correct form c) Valid or invalid .d) if (x 10) product-x'x d) valid or invalid if inval lid, what is correct form --

Explanation / Answer

1)

a) True

b) False

%f specifies float variables.

c) False

Os programs are stored on hard disk because RAM is volatile memory and as soon power is cut off it losses the data.

d) False

Division has higher priority over addition; the order is multiplication, division, remainder, addition, subtraction.

e) False

Class Loader/ Loader load the class file from native file system.

f) True

They can be declared before preprocessors.

2)

a)

idiv12 is 4

Explanation:

num1 = 56

num2 = 12

idiv12 =num1/num2

= 56/12

= 4.66666

But as the storing variable idiv12 is int it will ignore the fractional part.

fdiv34 is 2.52

Explanation:

num3 = 78

num4 = 31

fdiv34 = (float)num3/num4

= 78/31

= 2.51612

Now we need it to two decimal point we use %.2f format which will round off and prints the value upto two decimal points.

c) Invalid
Valid - scanf("%d%d",&num1,&num2)

d) Valid statement