compiler optimization, operator strength reduction uses mathematical identities to replace slow math operations with faster operations. Which of the following code replacements is an illustration of operator strength reduction? (A) Replace P + P by 2 * P or Replace 3 + 4 by 7. (B) Replace P * 32 by P<<5 (C) Replace P * 0 by 0 (D) Replace (P<<4) – P by P * 15

1 Answer

Answer :

(B) Replace P * 32 by P<<5

Related questions

Description : Which phase of compiler generates stream of atoms ? (A) Syntax analysis (B) Lexical Analysis (C) Code generation (D) Code optimization 

Last Answer : (A) Syntax analysis

Description : Loop unrolling is a code optimization technique: (A) that avoids tests at every iteration of the loop (B) that improves performance by decreasing the number of instructions in a basic block. ... loops with outer loops (D) that reorders operations to allow multiple computations to happen in parallel.

Last Answer : (A) that avoids tests at every iteration of the loop

Description : ............... package is used by compiler itself. So it does not need to be imported for use. A) java.math B) java.awt C) java.applet D) java.lang

Last Answer : D) java.lang

Description : A byte addressable computer has a memory capacity of 2 m Kbytes and can perform 2 n operations. An instruction involving 3 operands and one operator needs a maximum of (A) 3m bits (B) m + n bits (C) 3m + n bits (D) 3m + n + 30 bits

Last Answer : (D) 3m + n + 30 bits

Description : Consider the fractional knapsack instance n = 4, (p1, p2, p3, p4) = (10, 10, 12, 18), (w1, w2, w3, w4) = (2, 4, 6, 9) and M = 15. The maximum profit is given by (Assume p and w denotes profit and weight of objects respectively) (A) 40 (B) 38 (C) 32 (D) 30

Last Answer : (B) 38

Description : What is the output of the following piece of code when executed in Python shell? >>> a=("Check")*3 >>> a a) (‘Check’,’Check’,’Check’) b) * Operator not valid for tuples c) (‘CheckCheckCheck’) d) Syntax erro

Last Answer : c) (‘CheckCheckCheck’)

Description : The proper definition of a modern digital computer is A) An electronic automated machine that can solve problems involving words and numbers B) A more sophistic and modified electronic pocket calculator C) Any machine that can perform mathematical operations D) A machine that works on binary code

Last Answer : Answer : A

Description : The proper definition of a modern digital computer is a. An electronic automated machine that can solve problems involving words and numbers b. A more sophistic and modified electronic pocket calculator c. Any machine that can perform mathematical operations d. A machine that works on binary code

Last Answer : A machine that works on binary code

Description : The proper definition of a modern digital computer is a. An electronic automated machine that can solve problems involving words and numbers b. A more sophistic and modified electronic pocket calculator c. Any machine that can perform mathematical operations d. A machine that works on binary code

Last Answer : d. A machine that works on binary code

Description : 28. Linear programming is a a. Constrained optimization technique b. Technique for economic allocation of limited resources c. Mathematical technique d. All of the above

Last Answer : b. Technique for economic allocation of limited resource

Description : What is Software ? Set of computer programs, procedures and possibly associated document concerned with the operation of data processing. A set of compiler instructions A mathematical formula None of above

Last Answer : Set of computer programs, procedures and possibly associated document concerned with the operation of data processin

Description : The individual within the operations group who ordinarily uses a variety of keyboard devices, is the 1) Data Clerk 2) Keypunch Operator 3) Data Entry Clerk 4) Computer Operator

Last Answer : 3) Data Entry Clerk

Description : As shown in the illustration, which set of conditions, evident to the operator and the 'setpoint module' respectively, will result in a high exhaust temperature alarm on the 'starboard main engine'? EL-0094 A. 50°F and 3.3 volts B. 180°F and 6.0 volts C. 750°F and 0-10 volts D. 900°F and 7.5 volts

Last Answer : Answer: D

Description : In .............., the bodies of the two loops are merged together to form a single loop provided that they do not make any references to each other. (A) Loop unrolling (B) Strength reduction (C) Loop concatenation (D) Loop jamming

Last Answer : (D) Loop jamming

Description : Which of the following is not the function of client? A) Compile queries B) Query optimization C) Receive queries D) Result formatting and presentation

Last Answer : B) Query optimization

Description : Which of the following is/are the Database server functions? i) Data management ii) Transaction management iii) Compile queries iv) Query optimization A) i, ii, and iv only B) i, ii and iii only C) ii, iii and iv only D) All i, ii, iii, and iv

Last Answer : A) i, ii, and iv only

Description : Ingres is a ........................ A) Socket B) Compiler C) Database D) Web server

Last Answer : C) Database

Description : In the second type the information written in java after // is ignored by the ....................... A) Interpreter B) Compiler C) Programmer D) All of the above

Last Answer : B) Compiler

Description : When the operators are having the same priority, they are evaluated from ................. ............. in the order they appear in the expression. A) right to left B) left to right C) any of the order D) depends on compiler

Last Answer : B) left to right

Description : The compiler converts all operands upto the type of the largest operand is called (A) Type Promotion (B) Type Evaluation (C) Type Conversion (D) Type Declaration

Last Answer : (A) Type Promotion 

Description : The ............... transfers the executable image of a C++ program from hard disk to main memory. (A) Compiler (B) Linker (C) Debugger (D) Loader

Last Answer : (D) Loader

Description : Consider the following statements related to compiler construction: I. Lexical Analysis is specified by context-free grammars and implemented by pushdown automata. II. Syntax Analysis is specified by regular expressions and implemented by ... Only l (2) Only ll (3) Both I and II (4) Neither I nor Il

Last Answer : Answer: 4

Description : Which one of the following is correct for overloaded functions in C++? (1) Compiler sets up a separate function for every definition of function. (2) Compiler does not set up a ... functions cannot handle different types of objects. (4) Overloaded functions cannot have same number of arguments.

Last Answer : Answer: 1

Description : The versions of windows operating system like windows XP and window Vista uses following file system: (A) FAT-16 (B) FAT-32 (C) NTFS (NT File System) (D) All of the above

Last Answer : (D) All of the above

Description : Station A uses 32 byte packets to transmit messages to station B using sliding window protocol. The round trip delay between A and B is 40 milli seconds and the bottleneck bandwidth on the path between A and B is 64 kbps. The optimal window size of A is (1) 20 (2) 10 (3) 30 (4) 40

Last Answer : (2) 10

Description : 15 things no one tells you about knee replacements?

Last Answer : Knee replacement, also called knee arthroplasty or total knee replacement, is a surgical procedure to resurface a knee damaged by Arthritis. Metal and plastic parts are used to cap the ends of ... a surgical procedure where parts of knee joints are replaced with artificial parts. Call 03 94284128

Description : A fuzzy set A on R is ................. iff A(λx1 + (1 – λ)x2) ≥ min [A(x1), A(x2)] for all x1, x2 ∈ R and all λ ∈ [0, 1], where min denotes the minimum operator. (A) Support (B) α-cut (C) Convex (D) Concave 

Last Answer : (C) Convex 

Description : A Boolean operator Ө is defined as follows: 1Ө1=1, 1Ө0=0, 0Ө1=0 and 0Ө0=1 What will be the truth value of the expression (xӨy)Өz = xӨ(yӨz)? (A) Always false (B) Always true (C) Sometimes true (D) True when x, y, z are all true

Last Answer : (B) Always true

Description : ............... is often used to prove the correctness of a recursive function. (A) Diagonalization (B) Communitivity (C) Mathematical Induction (D) Matrix Multiplication

Last Answer : (C) Mathematical Induction

Description : The acronym SWOT stands for A. Special Weapons for Operations Timeliness B. Services, Worldwide Optimization, and Transport C. Strengths Worldwide Overcome Threats D. Strengths, Weaknesses, Opportunities, and Threats

Last Answer : Strengths, Weaknesses, Opportunities, and Threats

Description : The acronym SWOT stands for A. Special Weapons for Operations Timeliness B. Services, Worldwide Optimization, and Transport C. Strengths Worldwide Overcome Threats D. Strengths, Weaknesses, Opportunities, and Threats

Last Answer : Strengths, Weaknesses, Opportunities, and Threats

Description : The virtual address generated by a CPU is 32 bits. The Translation Lookaside Buffer (TLB) can hold total 64 page table entries and a 4-way set associative (i.e. with 4- cache lines in the set). The page size is 4 KB. The minimum size of TLB tag is (A) 12 bits (B) 15 bits (C) 16 bits (D) 20 bits

Last Answer : (C) 16 bits Explanation: VirtualAddress = 32 bits PageSize = 4KB = 12 bits therefore : VPNTag = 20 bits, OffsetTag = 12 bits TLBEntryLength = VPNTag = 20 bits TotalTLBEntries = 64, 4-way implies ... therefore : TLBIndex = 4 bits TLBTag = TLBEntryLength - TLBIndex = 20 - 4 = 16 bits

Description : What will be the hexadecimal value in the register ax (32-bit) after executing the following instructions? Mov al, 15 Mov ah, 15 Xor al, al Mov cl, 3 Shr ax, cl Codes: (A) 0F00 h (B) 0F0F h (C) 01E0 h (D) FFFF h

Last Answer : (C) 01E0 h

Description : A Multicomputer with 256 CPUs is organized as 16x16 grid. What is the worst case delay (in hops) that a message might have to take? (A) 16 (B) 15 (C) 32 (D) 30

Last Answer : (D) 30

Description : A memory management system has 64 pages with 512 bytes page size. Physical memory consists of 32 page frames. Number of bits required in logical and physical address are respectively: (1) 14 and 15 (2) 14 and 29 (3) 15 and 14 (4) 16 and 32

Last Answer : (3) 15 and 14

Description : What error will be generated if a space is given between the logical AND operator (&&)? Will it be a compile-time or a run-time error?

Last Answer : Example: if(5>2 & & 6

Description : State True or False. i) While overloading operators new operator can be overloaded. ii) The binary operator such as +, -, * and must explicitly return a value. A) True, True B) True, False C) False, True D) False, False

Last Answer : C) False, True

Description : Which of the following operates cannot be overloaded? i) Size of operator (sizeof) ii) Scope resolution Operator iii) Conditional operator (?:) iv) Assignment Operator (=) A) i, ii, iii only B) ii, iii, iv only C) i, iii, iv only D) all i, ii, iii, iv

Last Answer : A) i, ii, iii only

Description : The dereferencing operator ……… is used when the object itself is used width in the member pointer. A) ->* B) .* C) Any of the above D) None of the above

Last Answer : B) .*

Description : The dereferencing operator ………….. is used to access a member when we use pointers to both the object and the member. A) ->* B) .* C) Any of the above D) None of the above

Last Answer : A) ->*

Description : The ……………. Operator is known as insertion operator. A) >> B) > C)

Last Answer : C)

Description : Some of the C++ operators cannot overloaded which are i) Member access operators (. And .*) ii) Conditional operator (? :) iii) Scope resolution operator (: :) iv) Size operator (sizeof) A) only i, ii and iii B) only ii, iii and iv C) only ii and iv D) All i, ii, iii and iv

Last Answer : D) All i, ii, iii and iv

Description : Match the following a) : : i) Pointer to member declarator b) : :* ii) Pointer to member operator c) ->* iii) Scope resolution operator A) a-ii, b-iii, c-i B) a-iii, b-i, c-ii C) a-i b-ii, c-iii D) a-iii, b-ii, c-i

Last Answer : B) a-iii, b-i, c-ii

Description : Hierarchy decides which operator A) is most important B) is used first C) is fastest D) Operates on largest numbers

Last Answer : B) is used first

Description : . Costs for a computer based information system include the salaries of the system analysts and computer programmers. costs for a computer based information system include the ... ) Development, Development B) Development, Operating C) Operating, Development C) Operating, Operating

Last Answer : B) Development, Operating

Description : Which of the following is not comparison operator? A) B) < C) =< D) >=

Last Answer : C) =

Description : Which of the following is not a binary operator in relational algebra? A) Join B) Semi-Join C) Assignment D) Project

Last Answer : D) Project

Description : ………………….. operator is basically a join followed by a project on the attributes of first relation. A) Join B) Semi-Join C) Full Join D) Inner Join

Last Answer : B) Semi-Join