Analyse the following code snippet and choose the answer:-
#include
OBJECT CREATED OBJECT DESTROYED
OBJECT CREATED OBJECT DESTROYED IN MAIN
OBJECT CREATED IN MAIN
Compilation Error
Answer: Option B.
Suppose in a microprocessor the instruction MVI A, 32H takes 2 machine cycles one is op code fetch which composed of 4 T-states and the other is memory read which takes n T-states. If the total time taken by the processor to execute the instruction is 1400 nano sec with an operating frequency of 5 MHz. What is the value of n?
3
4
6
5
Answer: Option A.
Which is better computing time (in analysis of algorithm) ?
O(N)
O(2N)
O(log2 N)
O(N log2 N)
Answer: Option C.
The content of accumulator is 1000 0000 what will be its content after RR A instruction?
0000 0001
0000 0000
0100 0000
0000 0010
Answer: Option C.
Observe the following code and chose the correct statement(s)
class Name
{
const char *s ; .
};
class Table
{
Name *p; size_t sz ; public :
Table(size_ts = 15) {p = new Name [sz = s]; }
~Table() {delete [ ]p ;}
Name * lookup(const char *);
bool insert(Name *);
};