Sei sulla pagina 1di 2

EEL 2880: Engineering Software Techniques TEST 3: COMPREHENSIVE SPRING 2015 04 23 2015

(Dr. Subbarao V Wunnava: Write the solutions neatly: 100 pts total: Good Luck) NO ATTACHMENTS
04 28 2015: rework all the 4 problems for your benefit:
ANSWER ONLY ANY 3 OUT OF 4 AND STRIKE OUT THE QUESTION NOT TO BE GRADED
Code No: _ _ _ _ _ _Student Name: _____________________ _ _Student ID__________________

1]. TRUE OR FALSE Write clearly:


(a) In C++ language, multiplication has higher priority than addition
a)_ _ _ __ _ _
(b) In C++ language, overloading of functions can be done even for integer and decimal variables
b)_ _ _ __ _ _
(c ) in C++ , classes can contain multiple structures
c)_ _ _ __ _ _
(d ) Expression ( (x <y ) && (a >b) ) && (a > x) ) is false, if x is the largest
d)_ _ _ __ _ _
(e )In a processor, ALU does not directly communicate with the system bus
e)_ _ _ __ _ _
( f ) Dynamic MOS memory needs to be refreshed at least once every 2 seconds
f)_ _ _ _ _ _ _ _
( g) floor of ( - 10.7) is - 10
g) _ _ _ _ _ _ __
( h ) In the hex-decimal notation FFFF refers to 65536
h) _ _ _ _ _ _ _ _

.11] Answer the following clearly


.a) Each double variable takes 64 bits. double array[256] has been declared. What is the size of ‘array’ in bytes?

.a) size in bytes _ _ _ _ _ _


.b) In part (a) above, unsigned aPtr = &array[0]; aPtr decimal value is 123400. What would be address of elements
array[16], array[128], and the last element of the array?

Address values for: array[16]_ _ _ _ __ _ _ _ _array[128]_ _ __ _ _ _ __ _ last element _ _ _ _ _ _ _ _ _ _


.c) Each Digital TV frame has 1152 rows x 1536 columns of pixels. Each pixel has 64 bits of digital data. How much
memory in bytes is needed to store 32 frames:

Storage for 32 screen frames _ _ _ _ _ _ _ _


.d) 32 bit memory pointer binary value is given to be: 1011 0111 1110 1111 0110 0110 1111 1111; Show Hex Decimal
representation

Hex Decimal Value _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


.e) Java Byte code is similar to machine code: First byte is the Operation Code. Following 3 -5 bytes would be memory locations.
How many instructions are possible? What is needed to maintain portability?

Possible instructions__ _ _ _ _ _ _ _ _ _ _ _portability requirement _ _ _ _ _ _ _ _ _ _ _

1
111]. ANSWER THE FOLLOWING CLEARLY:
.a) How much Memory in bytes required to store the string: AaBbCc_DdEeFf_GgHhJj_KKKKKK_LLLLLL_MMMMM_NNNNN
32 times, following Unicode. What would be the memory size in bytes, if ASCII code is used instead of Unicode?

.a) memory in bytes for Unicode _ _ _ _ _ _ _ _ _ for ASCII _ _ _ _ _ _ _ _ _


.b ) In the following functional loop: k, count, sum, and total are integers. Initial values are: k= 0; total = 50 ; sum = 30; How many
times the for loop is run? What is the end value of count?
for ( count = 40 ; count > 18; count -=4 )
{
(total -=count);
(sum +=total);
++k;
} .b (loop is run) _ _ _ _ end value of count _ _ _ _
.c) What are final values of total and sum?

.c total _ _ _ _ _ _ _sum _ _ _ _ _ _ _
.d) R = ( (rand() %8) %5 ); What are the possible values for R?

d) actual values for R _ _ _ _ _ _

.e) double D[900] array has been declared; Dptr = &D[0]; Dptr decimal value is 2679376; What are the
. addresses of D[100]th element and the last element of the array D[].

.e) address of D[100]th element _ _ _ _ _ _ _last element _ _ _ _ _ _ __


.1V] 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.
Y = ((X[2][2]+ X[1][0])-X[0][1]); Z = (( X[2][0] + X[0][1])*X[0][2]);
What are Y and Z values, Z/Y and Y/Z values?

.a)Y = _ _ _ _ _ _Z = _ _ _ _ _ _ Z/Y _ _ _ _ _ _Y/Z _ _ _ _ _ _


.b)in C++ int and double square functions have been defined. Variables have been declared properly.
In the functional C++ code, statement Q = (square (square 6.2)); What type is Q (int, double,
char, none of these (which)? What is the value of Q?

.b) Q type _ _ _ _ _ _Q value _ _ _ _ _ _ _


.c) Can the class be declared after the main program in C++ (yes, no, some-times); Why or Why not?

.c) Ans _ _ _ _ _ _Reason _ _ _ _ _ _ _


.d) Inline functions in C++, allow function code to be substituted in the stack (yes, no, sometimes)

.d Ans _ _ __ _ _ _ _
.e) Using structures and binary representation, how many digital bits are needed to represent two 52
card decks together (2 bits, 4 bits, 7 bits, 12 bits, None of these (how many))

.e Ans _ _ _ _ _ _ _

DEAR ALL: THANKS FOR THE OPPORTUNITY TO BE ASSOCIATED WITH YOU IN THIS CLASS. BEST OF LUCK

Potrebbero piacerti anche