Interview Questions

Q:

What is Overloading Polymorphism?

Answer

Overloading allows multiple functions to exist with same name but different parameters. Again if you take bike as an example, it has a function “Start” with two forms i.e. ’Auto Start’ and ’kick start’.

Report Error

View answer Workspace Report Error Discuss

Subject: Java

0 2673
Q:

Which of the following is an example of market failure?

A) Prices do not reflect the full social cost of production B) A firm goes out of business because it cannot find a market for its products
C) Prices rise so that the consumers cannot afford the products they want to buy D) Producer surplus is maximized
 
Answer & Explanation Answer: A) Prices do not reflect the full social cost of production

Explanation:

Prices do not reflect the full social cost of production is an example of Market failure.

 

A market failure occurs when the supply of a good or service is insufficient to meet demand. This results in an inefficient distribution of resources among market participants.

It also occurs if externalities are not accounted for.

If a firm fails to maximize its profits this is not a general market failure.

Report Error

View Answer Report Error Discuss

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

0 2672
Q:

Explain how to store the uploaded file to the final location.

Answer

A HTML form should be build before uploading the file. The following HTML code is used for selecting the file that is to be uploaded. The type attribute of input must be “file”.


<form enctype="multipart/form-data" action="uploader.php" method="POST">


<input type="hidden" name="MAX_FILE_SIZE" value="100000" />


Choose a file to upload: <input name="uploadedfile" type="file" /><br />


<input type="submit" value="Upload File" />


</form>


At the time of executing uploader.php, the uploaded file will be stored in a temporary storage are on the webserver. An associative array $_FILES['uploadedfile']['name'] is used for uploading. The ‘name’ is the original file that is to be uploaded. Another associative array $_FILES['uploadedfile']['tmp_name'] is used for placing the uploaded file in a temporary location on the server and the file should be empty and should exist with the tmp_name.


The following code snippet is used for uploading the file.


$target_path = "uploads/"; // the target location of the file


$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);


if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) 


{


       echo "The file ". basename( $_FILES['uploadedfile']['name']). 


        " has been uploaded";


}


else


{


      echo “There was an error while uploading the file”;


}


The function move_uploaded_file()is used to place the source file into the destination folder, which resides on the server.


If the uploading is successful, the message “The file filename has been uploaded. Otherwise the error message “There was an error while uploading the file” would be displayed.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 2671
Q:

Generally accepted accounting principles are

Answer

Generally Accepted Accounting Principles (GAAP) are basic accounting principles and guidelines are concepts that govern the field of accounting.


 


Accounting principles and guidelines include :


 


* Business Entity Assumption


* Accounting Period


* Historical Cost Concept


* Full Disclosure Principle


* Cost Principle


* Matching Principle


* Materiality


* Monetary Unit Assumption.

Report Error

View answer Workspace Report Error Discuss

Subject: Accounts Payable Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

1 2669
Q:

What is hedging?

Answer

Hedging is a tool to minimize the risks. It is thus like an 'insurance' where one pays a premium but gets an assured amount in case of some uncertain event to the extent of the loss actually suffered on an equally opposite position for which the hedge was done. Thus, hedger is different from arbitrageur and speculators, as the intention here is not to maximize the profit but to minimize the loss.


E.g. In Capital Markets, suppose an investor has an equity portfolio of Rs. 2 lacs and the portfolio consists of all the major stocks of NIFTY. He thinks the market will improve in the long run but might go on a downside in the shortrun. NIFTY today stands at 4300. To minimize the risk of downfall, he enters into an option contract by buying NIFTY-PUT of strike 4300 at a premium of, say, Rs. 100. Thus, the actual amount paid is Rs. 5,000(lot size of NIFTY is 50). Also, the number of NIFTY-PUTs to be bought will vary on the beta of the portfolio so as to completely hedge the positon. 

Report Error

View answer Workspace Report Error Discuss

Subject: Finance

1 2668
Q:

Oracle Server supports two different forms of replication: Basic and Advanced replication. Explain difference between these.

Answer

Basic Replication : Basic replication is implemented using standard CREATE SNAPSHOT or CREATE MATERIALIZED VIEW statements. It can only replicate data and not procedures, indexes replication is always one-way, and snapshot copies are read only.


Advanced Replication : Advanced replication supports various configurations of updatable snapshot, multi-master and update anywhere replication. It is more difficult to configure but allows data and other database objects like indexes and procedures to be replicated.


 


Differences between Basic and Advanced replications:


- With basic replication, data replicas provide read-only access to the table data whereas advanced replication features extend the capabilities of basic read-only replication by allowing applications to update table replicas throughout a replicated database system.


- With Basic Replication applications can query data from local data replicas. On the other hand with advanced replication, data replicas anywhere in the system can provide both read and update access to a table's data.

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle

0 2668
Q:

What are the different types of workflow in WF?

Answer

In WF 4.0, the following two types of workflows are used:

 
     Flowchart workflows - Helps you to create workflows using the common flowchart elements. In WF, the Flowchart activity is generally used to implement a non-sequential workflow, and occasionally it implements sequential workflows in case the FlowDecision nodes are not used. The Flowchart activity contains a collection of flow nodes, which inherit from the FlowNode class. The following types of nodes or elements can be a part of a flowchart:
                 => FlowStep - Executes activities of a flowchart in a sequence.
                 => FlowDecision - Shows the execution on the basis of a Boolean condition.   It is similar to the If construct.
                 => FlowSwitch - Shows the execution on the basis of an exclusive switch. It is similar to the Switch construct.


      Procedural workflows - Helps you to create workflows using basic and sequential execution standards. In WF, procedural workflows use flow control constructs, such as While, Switch, ForEach, and If, to execute activities. These flow control constructs are similar to those found in procedural languages. Procedural workflows can also contain other flow control activities, such as Flowchart and Sequence.

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 2668
Q:

What does window.history object?

Answer

The window.history object can be written without the window prefix.
To protect the privacy of the users, there are limitations to how JavaScript can access this object.
Some methods:


    history.back() - same as clicking back in the browser
    history.forward() - same as clicking forward in the browser

Report Error

View answer Workspace Report Error Discuss

Subject: Web Technology

0 2667