IT Trainer Questions


Q:

Give an example for the use of volatile keyword in c++ ?

Answer

Most of the times compilers will do optimization to the code to speed up the program. For example in the below code,


int k = 15;
while( k == 15)


{
// Do something
}


compiler may think that value of 'k' is not getting changed in the program and replace it with 'while(true)', which will result in an infinite loop. In actual scenario, the value of 'k' may be getting updated from outside of the program.


Volatile keyword is used to tell compiler that the variable declared using 'volatile' may be used from outside the current scope, so that compiler won't apply any optimization. This matters only in case of multi-threaded applications.


In the above example if variable 'k' was declared using volatile, compiler will not optimize it. In shot, value of the volatile variables will be read from the memory location directly.

Report Error

View answer Workspace Report Error Discuss

5 5516
Q:

Which results in an increase in power?

A) doing more work in less time. B) doing less work in more time.
C) doing less work in less time. D) doing more work in more time.
 
Answer & Explanation Answer: A) doing more work in less time.

Explanation:

Doing more work in less time, results in an increase in power to do a work.

Report Error

View Answer Report Error Discuss

Filed Under: Physics
Exam Prep: AIEEE , Bank Exams , CAT , GATE , GRE
Job Role: Analyst , Bank Clerk , Bank PO , Database Administration , IT Trainer

6 5507
Q:

Reptile is to Lizard as Flower is to

A) Orchids B) Stem
C) Leaf D) Petal
 
Answer & Explanation Answer: A) Orchids

Explanation:

Here Lizard is a type of Reptiles whereas Orchid is a type of flowers. Other than Orchids all are parts of Plants.

 

Hence, Reptile is to Lizard as Flower is to Orchids.

Report Error

View Answer Report Error Discuss

Filed Under: Analogy
Exam Prep: AIEEE , Bank Exams , CAT , GATE , GRE , TOEFL
Job Role: Analyst , Bank Clerk , Bank PO , Database Administration , IT Trainer

10 5506
Q:

Which of the following are elements of SQL?

A) base-table-identifier ::= user-defined-name B) base-table-name ::= base-table-identifier
C) boolean-primary ::= comparison-predicate D) All the above
 
Answer & Explanation Answer: D) All the above

Explanation:
Report Error

View Answer Report Error Discuss

2 5497
Q:

Sandeep got Rs. 6000 as his share out of the total profit of Rs. 9000 which he and Saketh earned at the end of one year. If Sandeep invested Rs. 20000 for 6 months, whereas Saketh invested his amount for the whole year, the amount invested by Saketh?

A) Rs. 5000 B) Rs. 6200
C) Rs. 8100 D) R. 7600
 
Answer & Explanation Answer: A) Rs. 5000

Explanation:

Let the amount invested by saketh = RS. p

Now, that of sandeep = 20,000 x 6

saketh = 12 x p

Ratio of their earnings = 120000 : 12p = 6000 : (9000 - 6000)

=> 12000012p = 60003000 => p= Rs. 5000

Hence, the amount investe by saketh  = Rs. p  = Rs. 5000.

Report Error

View Answer Report Error Discuss

Filed Under: Partnership
Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Analyst , Bank Clerk , Bank PO , IT Trainer

13 5495
Q:

LCD of 12 and 18

A) 36 B) 42
C) 12 D) 6
 
Answer & Explanation Answer: A) 36

Explanation:

  LCD is nothing but Lowest or Least Common Denominator

 

Here LCD of 12 and 18 means LCD of two fractions with denominators 12 and 18 respectively.

 

Therefore, LCM of 12 & 18 = 6 x 3 x 2 = 36 

 

      •  How to calculate LCD ::


The lowest common denominator or least common denominator (LCD) is the least common multiple (LCM) of the denominators of a set of fractions.

Report Error

View Answer Report Error Discuss

Filed Under: HCF and LCM
Exam Prep: GRE , GATE , CAT , Bank Exams , AIEEE
Job Role: IT Trainer , Database Administration , Bank PO , Bank Clerk

27 5495
Q:

Values that are used to end loops are referred to as _____ values.

A) stop B) sentinel
C) end D) finish
 
Answer & Explanation Answer: B) sentinel

Explanation:
Report Error

View Answer Report Error Discuss

4 5462
Q:

Power Point presentation is a collection of

A) Outlines B) Slides and Handouts
C) Speaker’s notes D) All of the above
 
Answer & Explanation Answer: D) All of the above

Explanation:

Power Point presentation is a collection of Slides and Handouts, Outlines and Speaker’s notes.

Report Error

View Answer Report Error Discuss

3 5457