Interview 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 5417
Q:

Consumer protection laws are meant to

Answer

Protect the consumer from the seller who cheat to sell his product.


 


The FTC’s Bureau of Consumer Protection stops unfair, deceptive and fraudulent business practices by collecting complaints and conducting investigations, suing companies and people that break the law, developing rules to maintain a fair marketplace, and educating consumers and businesses about their rights and responsibilities.

Report Error

View answer Workspace Report Error Discuss

Subject: Marketing and Sales Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

1 5413
Q:

Assuming that you are selected, what will be your strategy for next 30 days?

Answer

If I am chosen for this position, I’ll use my first 30 days in understanding my role carefully in terms of the contribution to the industry and increasing the overall profitability. I’ll sit with my line manager and other juniors to realize what has already been finished and what its impact has been. From there on, I’ll formulate my strategy to development in close conjunction with managers and see that it is perfectly implemented.

Report Error

View answer Workspace Report Error Discuss

Subject: Human Resources

3 5410
Q:

What is the function of the CICS translator?

Answer

The CICS translator converts the EXEC CICS commands into call statements for a specific programming language. There are CICS translators for Assembler, COBOL, and PL/1.

Report Error

View answer Workspace Report Error Discuss

0 5409
Q:

What is account payable? How we pass the entries in account payable and related all the question based on account payable?

Answer

Accounts Payable is a short term liability of an organization. It's a process by which a company buys goods and services on credit and is billed in the form of an invoice, which states the terms and conditions of the payment. Accounts Payable is recorded as a current liability in the balance sheet. All accounts paayble entries are to be coded under the right G/L accounts to have an accurate picture of the company's short term liability.

Report Error

View answer Workspace Report Error Discuss

Subject: Accounts Payable

4 5406
Q:

What is dynamic method dispatch?

Answer

Dynamic method dispatch which is also known as runtime polymorphism is a process in which a call to an overridden method is resolved at runtime rather than at compile-time. In this process, an overridden method is called through the reference variable of a superclass. The determination of the method to be called is based on the object being referred to by the reference variable.

Report Error

View answer Workspace Report Error Discuss

Subject: Java

0 5346
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 5340
Q:

What is a key field in an IMS database?

Answer

A Field that DL/I uses to maintain the segments in the ascending order is called the key field

Report Error

View answer Workspace Report Error Discuss

2 5338