Question 3] Answer the following clearly, showing neat working: a) unsigned X[3]
ID: 3904532 • Letter: Q
Question
Question 3] Answer the following clearly, showing neat working: a) unsigned X[3][3]-((42, 39, 18), {91,34,56), {2,17, 27)); Y and Z are floating point type. b)in int and double square functions have been defined. Variables have been declared properly. In the functional c++ code, statement Q square(square(3.2): What type is Q (int, double, char, Unsigned, none of these (which)? What is the value of .b) Q type class be declared after the main program in C+ (yes, no, value -- ---_Q value some-times); Why or why not? .c) Can the class be declared after the sein progran in C y not d) Inline functions in Ct+, allow function code to be substituted in the stack yes, no, sometimes) e) Using structures and bitwise binary representation, how many minimun number of bits needed to .c) Ans Reason .d Ans represent 184 cards consisting of two decks. [4 bits,5 bits,7 bits, none of these(how many)1 .f) In Java, variables can be declared anywhere in the program code [yes, no, sone-times, does not natter]? Why? .Question 4] Answer the following clearly: .a) Functional memory initialization C program for an SML system is as shown. SIZE-27 why - for (k 40; k> SIZE; -k) memory [kj-((20*(k-4)+40)) printr vn memory t%d1-vt %d", k, memory ?kn. How many memory locations are initialized in the above for loop Ans .b) What are the contents of locations 40, 36, 32, 28,? Contents of locations 40 c) double A[32][(321/32)[32] has been declared. How many bytes of memory is occupied by the A array? d)Each pixel for a High Definition display uses 4 bytes consisting of RBGW [Red, Blue, Green, White]. Display consists of 1200 x900 pixels per frame. How much memory is needed per frame in bytes? d Memory per frame_-.... .e) What is the minimum display rate in bits per second, under conditions of part (d) above e display rate_-- f) Steganography uses least significant bit of each RBGW byte. In one frame, how many bytes of Steganography data is hidden? Can t Steganography data be hidden in the most significant bit ? (yes, no, does not matter .e Ans_ Most significant bit?Explanation / Answer
1. Y = 209.00, Z = 1640.00
Explanation:
Y = X[2][2] + X[1][0] * X[2][0] = 27 + 91 * 2; According to bodmas rule answer = 209
Z = X[2][0] + X[0][1] * X[0][0] = 2 + 39 * 42; According to bodmas rule answer = 1640
2. Q type = float; Q value = 10485.76
square(x) function returns x*x; square(square(x)) = x^4; Therefore 3.2^4 = 10485.76
3. No; Reason: The compiler has to see the definition of the class before it can use it.
4. Yes; inline function in c++ allow function code to be substitued in the stack
5. 7 bits: 2^7 = 128; greater than 104;
6. Yes; In java varaible can be declared anywhere in the program
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.