Subscribe

RSS Feed (xml)

Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

Search Your Question

Showing posts with label Technical Interview Questions. Show all posts
Showing posts with label Technical Interview Questions. Show all posts

Monday, May 26, 2008

Technical &Quantitative Interview Questions Interview question

Valuing a Company Questions:
What are 3 ways to value a company?
I see you worked for Company X. What valuation methods would you use to value Company X and why?
How would you go about valuing a company whose stock you were considering buying?
What project in a previous job or class involved valuing a company and how did you value that company?
Of the different ways to value a company, which typically gives you the highest
valuation? The lowest?
It’s 10pm and you have a pitch to prepare for morning – what would you do to prepare a valuation for the client company?
How do you value a company with no revenue?
Tell me how you would go about valuing a privately held construction company?
What if there are no publicly traded peers?
What criteria are you using to evaluate the company for which you hope to work?
What are the main issues in valuing a privately held firm?
How would you value a non-U.S. company?
How would you value a company with no earnings such as a start up?
I see you worked for Company X. What valuation methods would you use to value Company X and why? Which companies would you use as comparables and why? What multiples would you use to compare and why?
DCF Questions:
Walk me through a DCF.
How do you compute a terminal value on a DCF?
How do you determine your Free Cash Flows? Why is there a need to calculate it?
Where do you get EBIT?
What is EBIT?
What is EBITDA?
Why is EBITDA a surrogate for operating cash flows?
What is the difference between EBIT and Operating Income?
What is WACC and how do you calculate it? Or In a DCF how do you get to WACC? Or Can you walk me through how you would determine a company’s Weighted Average Cost of Capital (WACC)?
What type of discount rate would I use in valuing the cash flows of a particular company?
How do I arrive at the WACC for a given company?
What is the value ratio?
How do you determine the cost of equity?
How do you determine the cost of debt?
What is beta?
What is CAPM and how do you calculate it?
What beta do you use in CAPM and how do you obtain it?
How do you unlever a Beta? Why do you unlever a beta?
How do you lever a Beta? Why do you lever a beta?
In calculating CAPM, do you use an asset beta or an equity beta?
When do you use an unlevered Beta or a levered Beta?
If you have an asset beta how do you derive your equity beta?
What companies or industries have high Betas?
You are interested in X company, what is its beta and the industry average beta?
What index is used to calculate beta?
How do you calculate an equity beta?
Is beta constant or does it vary over time?
What do you think the beta of General Motors is? What about a high-tech stock such as Cisco Systems?
Which is higher, cost of equity or cost of debt?
What number would you use for the market risk premium?
What number would you use for the risk-free rate?
What is a terminal value and the two ways to calculate the terminal value?
How do you calculate the Gordon Growth Model or Perpetuity Model for the second Terminal Value?
What are some of the advantages and disadvantages of DCF?
What is NOPLAT?
Is a DCF valuation the value of equity or the enterprise value of a company?
Reconcile Free Cash Flow from Net Income?
How do you find diluted shares outstanding?
What is the Treasury Stock Method? When would you use it? How do you calculate it?
How do you get the Enterprise Value (or known as firm value, total capitalization, transaction value, aggregate value, adjusted market value)?
What are some shortcomings of DCF?
Is a DCF valuation the value of equity or the enterprise value of a company?
Reconcile Free Cash Flow from Net Income.
Can you walk me through how you would determine a company’s Weighted Average Cost of Capital (WACC)?
Comparable Questions:
Understand equity and enterprise multiples. Know them backwards and forwards and when you apply them, what companies would use equity multiples vs. enterprise multiples, how it is related to debt, etc.
1. Which are higher? Acquisition comparable multiples or public company comparable multiples? Why?
2. What are the difference between public comparables and acquisition comparables?
3. Why don’t you compare Net Income to Enterprise Value?
4. What is difference between Enterprise Value and Equity Value?
Public or Trading Comparables Questions: 1. Pick a company. What multiples would you use for that company? What if it was a start-up? What if it had high CAPEX that was unusual? 2. What determining factors would you use to find comparable companies for a public comp?
3. How would you do a public comparable?
4. How do you find the appropriate market value for a company?
5. How do you find diluted shares outstanding?
6. What is the Treasury Stock Method? When would you use it? How do you calculate it?
7. You are interested in company X, what multiples would you use to compare it to its peers?
8. How would you find information for a comp?
9. When do you use public vs. acquisition?
10. You said you were interested in health care, what is an average P/E multiple in this area.
Acquistion or Transaction Comparables Questions:
1. What are the key factors in determining your comparable transactions?
2. What is included in the price paid for an acquisition?
3. What is the difference between offer value and equity value?
4. What is the difference between transaction value and enterprise value?
5. How would you determine the deal list for acquisition comps?
6. What are some shortcomings of acquisition comps?
7. What multiples would you use for acquisition comps?
Random Questions:
1111. Company A and B are in the restaurant business. Company A is buying company B. What things would company A want to know?
12. What is an option? You're talking to a CEO about how he could use options. What would you say?
13. How would you value and compare a private all equity company vs. a public company with equity and debt?
14. How do you calculate the cost of debt for a private company?
15. If valuing an all-equity company, how would you calculate the cost of equity?
16. If you were advising a client on an acquisition and your client was willing to pay between $800M - $1B and you knew a PE outfit was about to make a bid for $850M, what would you offer to preempt their bid?
17. If company A owned its stores and company B leased its stores, which would have the higher EBITDA?
18. It’s 10pm and you have a pitch to prepare for morning – what would you do to prepare a valuation for the client company?
19. If a target company has a higher P/E than the acquirer in an all-stock deal, will the acquisition be accretive or dilutive?
20. What are the benefits of pooling versus purchase method in an acquisition?
21. You said you were interested in technology, what's the average debt load for a technology company?
22. What is an LBO and how is it structured?
23. What make a company a good candidate for an LBO?
24. How do you ref out a model? (more geared towards former analysts). When a model blows up, what are the three ways to fix it?
25. In a secondary offering, if you could only choose one method of valuation, which one would you use? Why?
26. What is operating leverage?
27. Tell me how you have modeled with equations in the past?
28. Do you have an analytical mind? Show me.
29. What are the benefits of pooling versus purchase method in an acquisition?
30. Here’s a whiteboard. Stand in front of it and present a chapter from your favorite finance textbook. You have five minutes.
31. Do you know the relationship between the price and yield on the bond?
32. How you developed your core finance skills (analytical ability, good communication skills, strong work ethic)?
33. What is an option? You're talking to a CEO about how he could use options. What would you say?
34. Tell me about the stock a stock that you follow? (what are we suppose to say)
35. What does liquidity allow an investor?
36. If you worked for the finance division of our company, how would you decide whether or not to invest in a project?
37. Why might a technology company be more highly valued in the market in terms of P/E than a steel company?
38. When should a company raise money via equity?
39. When should a company raise funds using debt?
40. How would one price the different elements of a convertible bond? (not as likely of a question)
41. Your client wants to buy one of two banks. One is trading at 12xP/E and the other trades at a 16xP/E. Which should your client try to buy? Do you even have enough information to determine this?
42. What are some ways to determine if a company might be a credit risk?
43. How does compounding work? Would I be better off with 10% annually, semi-annually or daily?
44. For a bond, what is duration? Why is duration important?
45. What is the difference between preferred stock and regular stock?
46. How can a company raise its stock price?
47. What is a leveraged buyout? Why lever up?
48. Your boss uses the DCF model for high growth company with low earnings. What do you think of this strategy?
49. Can I apply CAPM in Latin America markets?
50. How do you value a company with NOLS (Net Operating Losses)?
51. Why would a company do a share repurchase or buyback?
52. What are the pros and cons of a company going public?
53. Why would a company decide to issue a convertible bond or equity or debt?
Math Questions:
Find a way to break down each question instead of doing long calculations.
1. Brain Teaser: Say you are driving 2 miles on a 1-mile track. You do one lap at 30 miles per hour. How fast do you need to go to average 60 miles an hour.
2. Give me the sum of all the numbers between 1 and 100.
3. You have a painting that is $320 that is selling for 20 percent off. Howmuch is the discounted price?
4. What is 4 cubed?
5. What is 6 cubed?
6. What is 7 cubed?
7. What is 8 cubed?
8. What is 9 cubed?
9. What is 2/3 + 3/4?
10. What is 1% of one million?
11. What is 10,000 x 10,000?
12. What is larger 3^4 or 4^3?
13. What is larger 3^5 or 4^4?
14. What is 100*100?
15. What is 10,000/8?
16. What is 40% of 1250?
17. What is 3/16 in a decimal?
18. What is 7/16 in a decimal

PHP Interview Questions - Part 1 Interview question

1. What are the differences between GET and POST methods in form submitting, give the case where we can use get and we can use post methods?

On the server side, the main difference between GET and POST is where the submitted is stored. The $_GET array stores data submitted by the GET method. The $_POST array stores data submitted by the POST method.

On the browser side, the difference is that data submitted by the GET method will be displayed in the browser’s address field. Data submitted by the POST method will not be displayed anywhere on the browser.

GET method is mostly used for submitting a small amount and less sensitive data. POST method is mostly used for submitting a large amount or sensitive data.

2. Who is the father of php and explain the changes in php versions?

Rasmus Lerdorf for version changes go to http://php.net/ Marco Tabini is the founder and publisher of php|architect.

3. How can we submit from without a submit button?

We can use a simple JavaScript code linked to an event trigger of any form field. In the JavaScript code, we can call the document.form.submit() function to submit the form. For example:

4. How many ways we can retrieve the date in result set of mysql Using php?

As individual objects so single record or as a set or arrays.

5. What is the difference between mysql_fetch_object and mysql_fetch_array?

MySQL fetch object will collect first single matching record where mysql_fetch_array will collect all matching records from the table in an array.

6. What is the difference between $message and $$message?

They are both variables. But $message is a variable with a fixed name. $$message is a variable who’s name is stored in $message. For example, if $message contains "var", $$message is the same as $var.

7. How can we extract string ‘abc.com ‘ from a string ‘http://info@a…’ using regular _expression of php?

We can use the preg_match() function with "/.*@(.*)$/" as the regular expression pattern. For example: preg_match("/.*@(.*)$/","http://info@abc.com",$data); echo $data[1];

8. How can we create a database using php and mysql?

PHP: mysql_create_db()
Mysql: create database;

9. What are the differences between require and include, include_once?

File will not be included more than once. If we want to include a file once only and further calling of the file will be ignored then we have to use the PHP function include_once(). This will prevent problems with function redefinitions, variable value reassignments, etc.

10. Can we use include ("abc.php") two times in a php page "makeit.php"?

Yes we can include..

11. What are the different tables present in mysql, which type of table is generated when we are creating a table in the following
syntax: create table employee(eno int(2),ename varchar(10)) ?

Total 5 types of tables we can create

1. MyISAM

2. Heap

3. Merge

4. InnoDB

5. ISAM

6. BDB
MyISAM is the default storage engine as of MySQL 3.23.

12. Functions in IMAP, POP3 AND LDAP?

Please visit:
http://fi2.php.net/imap
http://uk2.php.net/ldap

13. How can I execute a php script using command line?

Just run the PHP CLI (Command Line Interface) program and provide the PHP script file name as the command line argument. For example, "php myScript.php", assuming "php" is the command to invoke the CLI program.
Be aware that if your PHP script was written for the Web CGI interface, it may not execute properly in command line environment.

14. Suppose your ZEND engine supports the mode Then how can u configure your php ZEND engine to support mode ?

If you change the line: short_open_tag = off in php.ini file. Then your php ZEND engine support only mode.

15. Shopping cart online validation i.e. how can we configure the paypals?

16. What is meant by nl2br()?

nl2br — Inserts HTML line breaks before all newlines in a string string nl2br (string); Returns string with ‘’ inserted before all newlines. For example: echo nl2br("god bless\n you") will output "god bless \n you" to your browser.

17. Draw the architecture of ZEND engine?

18. What are the current versions of apache, php, and mysql?

PHP: php5.1.2
MySQL: MySQL 5.1
Apache: Apache 2.1

19. What are the reasons for selecting lamp (Linux, apache, mysql, php) instead of combination of other software programs, servers and operating systems?

All of those are open source resource. Security of linux is very very more than windows. Apache is a better server that IIS both in functionality and security. Mysql is world most popular open source database. Php is more faster that asp or any other scripting language.

20. How can we encrypt and decrypt a data present in a mysql table using mysql?

AES_ENCRYPT () and AES_DECRYPT ()

21. How can we encrypt the username and password using php?

You can encrypt a password with the following Mysql>SET PASSWORD=PASSWORD("Password");
We can encode data using base64_encode($string) and can decode using base64_decode($string);

22. What are the features and advantages of OBJECT ORIENTED PROGRAMMING?

One of the main advantages of OO programming is its ease of modification; objects can easily be modified and added to a system there by reducing maintenance costs. OO programming is also considered to be better at modeling the real world than is procedural programming. It allows for more complicated and flexible interactions. OO systems are also easier for non-technical personnel to understand and easier for them to participate in the maintenance and enhancement of a system because it appeals to natural human cognition patterns.
For some systems, an OO approach can speed development time since many objects are standard across systems and can be reused. Components that manage dates, shipping, shopping carts, etc. can be purchased and easily modified for a specific system.

23. What are the differences between PROCEDURE ORIENTED LANGUAGES and OBJECT ORIENTED LANGUAGES?

Traditional programming has the following characteristics:

Functions are written sequentially, so that a change in programming can affect any code that follows it.
If a function is used multiple times in a system (i.e., a piece of code that manages the date), it is often simply cut and pasted into each program (i.e., a change log, order function, fulfillment system, etc). If a date change is needed (i.e., Y2K when the code needed to be changed to handle four numerical digits instead of two), all these pieces of code must be found, modified, and tested.
Code (sequences of computer instructions) and data (information on which the instructions operates on) are kept separate. Multiple sets of code can access and modify one set of data. One set of code may rely on data in multiple places. Multiple sets of code and data are required to work together. Changes made to any of the code sets and data sets can cause problems through out the system.

Object-Oriented programming takes a radically different approach:

Code and data are merged into one indivisible item – an object (the term "component" has also been used to describe an object.) An object is an abstraction of a set of real-world things (for example, an object may be created around "date") The object would contain all information and functionality for that thing (A date
object it may contain labels like January, February, Tuesday, Wednesday. It may contain functionality that manages leap years, determines if it is a business day or a holiday, etc., See Fig. 1). Ideally, information about a particular thing should reside in only one place in a system. The information within an object is encapsulated (or hidden) from the rest of the system.
A system is composed of multiple objects (i.e., date function, reports, order processing, etc., See Fig 2). When one object needs information from another object, a request is sent asking for specific information. (for example, a report object may need to know what today’s date is and will send a request to the date object) These requests are called messages and each object has an interface that manages messages.
OO programming languages include features such as "class", "instance", "inheritance", and "polymorphism" that increase the power and flexibility of an object.

24. What is the use of friend function?

Friend functions
Sometimes a function is best shared among a number of different classes. Such functions can be declared either as member functions of one class or as global functions. In either case they can be set to be friends of other classes, by using a friend specifier in the class that is admitting them. Such functions can use all attributes of the class whichnames them as a friend, as if they were themselves members of that class.
A friend declaration is essentially a prototype for a member function, but instead of requiring an implementation with the name of that class attached by the double colon syntax, a global function or member function of another class provides the match.

class mylinkage
{
private:
mylinkage * prev;
mylinkage * next;

protected:
friend void set_prev(mylinkage* L, mylinkage* N);
void set_next(mylinkage* L);

public:
mylinkage * succ();
mylinkage * pred();
mylinkage();
};

void mylinkage::set_next(mylinkage* L) { next = L; }

void set_prev(mylinkage * L, mylinkage * N ) { N->prev = L; }

Friends in other classes

It is possible to specify a member function of another class as a friend as follows:

class C
{
friend int B::f1();
};
class B
{
int f1();
};

It is also possible to specify all the functions in another class as friends, by specifying the entire class as a friend.

class A
{
friend class B;
};

Friend functions allow binary operators to be defined which combine private data in a pair of objects. This is particularly powerful when using the operator overloading features of C++. We will return to it when we look at overloading.

25. What are the differences between public, private, protected, static, transient, final and volatile?
element Class Interface
Data field Method Constructor
modifier top level nested top level nested
(outer) (inner) (outer) (inner)
final yes yes no yes yes no no
private yes yes yes no yes no yes
protected yes yes yes no yes no yes
public yes yes yes yes yes yes yes
static yes yes no no yes no yes
transient yes no no no no no no
volatile yes no no no no no no

26. What are the different types of errors in php?

Three are three types of errors:

1. Notices: These are trivial, non-critical errors that PHP encounters while executing a script - for example, accessing a variable that has not yet been defined. By default, such errors are not displayed to the user at all - although, as you will see, you can change this default behaviour.

2. Warnings: These are more serious errors - for example, attempting to include() a file which does not exist. By default, these errors are displayed to the user, but they do not result in script termination.

3. Fatal errors: These are critical errors - for example, instantiating an object of a non-existent class, or calling a non-existent function. These errors cause the immediate termination of the script, and PHP's default behaviour is to display them to the user when they take place.

27. What is the functionality of the function strstr and stristr?

strstr() returns part of a given string from the first occurrence of a given substring to the end of the string. For example: strstr("user@example.com","@") will return "@example.com".
stristr() is idential to strstr() except that it is case insensitive.

28. What are the differences between PHP 3 and PHP 4 and PHP 5?

Go read the release notes at http://php.net.

29. How can we convert asp pages to php pages?

You can download asp2php front-end application from the site http://asp2php.naken.cc.

30. What is the functionality of the function htmlentities?

Answer: htmlentities — Convert all applicable characters to HTML entities
This function is identical to htmlspecialchars() in all ways, except with htmlentities(), all characters which have HTML character entity equivalents are translated into these entities.

31. How can we get second of the current time using date function?

$second = date("s");

32. How can we convert the time zones using php?

33. What is meant by urlencode and urldocode?

urlencode() returns the URL encoded version of the given string. URL coding converts special characters into % signs followed by two hex digits. For example: urlencode("10.00%") will return "10%2E00%25?. URL encoded strings are safe to be used as part of URLs.
urldecode() returns the URL decoded version of the given string.

34. What is the difference between the functions unlink and unset?

unlink() deletes the given file from the file system.
unset() makes a variable undefined.

35. How can we register the variables into a session?

We can use the session_register ($ur_session_var) function.

36. How can we get the properties (size, type, width, height) of an image using php image functions?

To know the Image type use exif_imagetype () function
To know the Image size use getimagesize () function
To know the image width use imagesx () function
To know the image height use imagesy() function

37. How can we get the browser properties using php?

38. What is the maximum size of a file that can be uploaded using php and how can we change this?

You can change maximum size of a file set upload_max_filesize variable in php.ini file

39. How can we increase the execution time of a php script?

Set max_execution_time variable in php.ini file to your desired time in second.

40. How can we take a backup of a mysql table and how can we restore it.?
Answer: Create a full backup of your database: shell> mysqldump –tab=/path/to/some/dir –opt db_name Or: shell> mysqlhotcopy db_name /path/to/some/dir
The full backup file is just a set of SQL statements, so restoring it is very easy:

shell> mysql "."Executed";
mysql_close($link2);

41. How can we optimize or increase the speed of a mysql select query?

42. How many ways can we get the value of current session id?
ans:-
session_id() returns the session id for the current session.

43. How can we destroy the session, how can we unset the variable of a session?
Ans:-
session_unregister — Unregister a global variable from the current session
session_unset — Free all session variables

44. How can we destroy the cookie?
Ans:-
Set the cookie in past

45. How many ways we can pass the variable through the navigation between the pages?
Ans:-
GET or QueryString and POST

46. What is the difference between ereg_replace() and eregi_replace()?
Ans:-
eregi_replace() function is identical to ereg_replace() except that this ignores case distinction when matching alphabetic characters.eregi_replace() function is identical to ereg_replace() except that this ignores case distinction when matching alphabetic characters.

47. What are the different functions in sorting an array?
Ans:-
Sorting functions in PHP,
asort-http://www.php.net/manual/en/function.asort.php
arsort-http://www.php.net/manual/en/function.arsort.php
ksort-http://www.php.net/manual/en/function.ksort.php
krsort-http://www.php.net/manual/en/function.krsort.php
uksort-http://www.php.net/manual/en/function.uksort.php
sort-http://www.php.net/manual/en/function.sort.php
natsort-http://www.php.net/manual/en/function.natsort.php
rsort-http://www.php.net/manual/en/function.rsort.php

48. How can we know the count/number of elements of an array?
Ans:-
2 ways
a) sizeof($urarray) This function is an alias of count()
b) count($urarray)
interestingly if u just pass a simple var instead of a an array it will return 1.

49. What is the PHP predefined variable that tells the What types of images that PHP supports?

50. How can I know that a variable is a number or not using a JavaScript?

51. List out some tools through which we can draw E-R diagrams for mysql.

52. How can I retrieve values from one database server and store them in other database server using PHP?

53. List out the predefined classes in php?

Directory
stdClass
__PHP_Incomplete_Class
exception
php_user_filter

54. How can I make a script that can be bilanguage (supports Eglish, German)?

You can change charset variable in above line in the script to support bilanguage.

55. What are the difference between abstract class and interface?

Abstract class: abstract classes are the class where one or more methods are abstract but not necessarily all method has to be abstract. Abstract methods are the methods, which are declare in its class but not define. The definition of those methods must be in its extending class.

Interface: Interfaces are one type of class where all the methods are abstract. That means all the methods only declared but not defined. All the methods must be define by its implemented class.

56. How can we send mail-using JavaScript?

NO! JavaScript can't email a form! but, there are alternatives to send the form data to an email address.

57. How can we repair a mysql table?

The syntex for repairing a mysql table is
REPAIR TABLENAME, [TABLENAME, ], [Quick],[Extended]
This command will repair the table specified if the quick is given the mysql will do a repair of only the index tree if the extended is given it will create index row by row

58. What are the advantages of stored procedures, triggers, indexes?

A stored procedure is a set of SQL commands that can be compiled and stored in the server. Once this has been done, clients don't need to keep re-issuing the entire query but can refer to the stored procedure. This provides better overall performance because the query has to be parsed only once, and less information needs to be sent between the server and the client. You can also raise the conceptual level by having libraries of functions in the server. However, stored procedures of course do increase the load on the database server system, as more of the work is done on the server side and less on the client (application) side.
Triggers will also be implemented. A trigger is effectively a type of stored procedure, one that is invoked when a particular event occurs. For example, you can install a stored procedure that is triggered each time a record is deleted from a transaction table and that stored procedure automatically deletes the corresponding customer from a customer table when all his transactions are deleted.
Indexes are used to find rows with specific column values quickly. Without an index, MySQL must begin with the first row and then read through the entire table to find the relevant rows. The larger the table, the more this costs. If the table has an index for the columns in question, MySQL can quickly determine the position to seek to in the middle of the data file without having to look at all the data. If a table has 1,000 rows, this is at least 100 times faster than reading sequentially. If you need to access most of the rows, it is faster to read sequentially, because this minimizes disk seeks.

59. What is the maximum length of a table name, database name, and fieldname in mysql?

Database name- 64
Table name -64
Fieldname-64

60. How many values can the SET function of mysql takes?

Mysql set can take zero or more values but at the maximum it can take 64 values

61. What are the other commands to know the structure of table using mysql commands except explain command?

describe table_name;a

Saturday, May 24, 2008

PHP Interview Questions - Part 1 Interview question

1. What are the differences between GET and POST methods in form submitting, give the case where we can use get and we can use post methods?

On the server side, the main difference between GET and POST is where the submitted is stored. The $_GET array stores data submitted by the GET method. The $_POST array stores data submitted by the POST method.

On the browser side, the difference is that data submitted by the GET method will be displayed in the browser’s address field. Data submitted by the POST method will not be displayed anywhere on the browser.

GET method is mostly used for submitting a small amount and less sensitive data. POST method is mostly used for submitting a large amount or sensitive data.

2. Who is the father of php and explain the changes in php versions?

Rasmus Lerdorf for version changes go to http://php.net/ Marco Tabini is the founder and publisher of php|architect.

3. How can we submit from without a submit button?

We can use a simple JavaScript code linked to an event trigger of any form field. In the JavaScript code, we can call the document.form.submit() function to submit the form. For example:

4. How many ways we can retrieve the date in result set of mysql Using php?

As individual objects so single record or as a set or arrays.

5. What is the difference between mysql_fetch_object and mysql_fetch_array?

MySQL fetch object will collect first single matching record where mysql_fetch_array will collect all matching records from the table in an array.

6. What is the difference between $message and $$message?

They are both variables. But $message is a variable with a fixed name. $$message is a variable who’s name is stored in $message. For example, if $message contains "var", $$message is the same as $var.

7. How can we extract string ‘abc.com ‘ from a string ‘http://info@a…’ using regular _expression of php?

We can use the preg_match() function with "/.*@(.*)$/" as the regular expression pattern. For example: preg_match("/.*@(.*)$/","http://info@abc.com",$data); echo $data[1];

8. How can we create a database using php and mysql?

PHP: mysql_create_db()
Mysql: create database;

9. What are the differences between require and include, include_once?

File will not be included more than once. If we want to include a file once only and further calling of the file will be ignored then we have to use the PHP function include_once(). This will prevent problems with function redefinitions, variable value reassignments, etc.

10. Can we use include ("abc.php") two times in a php page "makeit.php"?

Yes we can include..

11. What are the different tables present in mysql, which type of table is generated when we are creating a table in the following
syntax: create table employee(eno int(2),ename varchar(10)) ?

Total 5 types of tables we can create

1. MyISAM

2. Heap

3. Merge

4. InnoDB

5. ISAM

6. BDB
MyISAM is the default storage engine as of MySQL 3.23.

12. Functions in IMAP, POP3 AND LDAP?

Please visit:
http://fi2.php.net/imap
http://uk2.php.net/ldap

13. How can I execute a php script using command line?

Just run the PHP CLI (Command Line Interface) program and provide the PHP script file name as the command line argument. For example, "php myScript.php", assuming "php" is the command to invoke the CLI program.
Be aware that if your PHP script was written for the Web CGI interface, it may not execute properly in command line environment.

14. Suppose your ZEND engine supports the mode Then how can u configure your php ZEND engine to support mode ?

If you change the line: short_open_tag = off in php.ini file. Then your php ZEND engine support only mode.

15. Shopping cart online validation i.e. how can we configure the paypals?

16. What is meant by nl2br()?

nl2br — Inserts HTML line breaks before all newlines in a string string nl2br (string); Returns string with ‘’ inserted before all newlines. For example: echo nl2br("god bless\n you") will output "god bless \n you" to your browser.

17. Draw the architecture of ZEND engine?

18. What are the current versions of apache, php, and mysql?

PHP: php5.1.2
MySQL: MySQL 5.1
Apache: Apache 2.1

19. What are the reasons for selecting lamp (Linux, apache, mysql, php) instead of combination of other software programs, servers and operating systems?

All of those are open source resource. Security of linux is very very more than windows. Apache is a better server that IIS both in functionality and security. Mysql is world most popular open source database. Php is more faster that asp or any other scripting language.

20. How can we encrypt and decrypt a data present in a mysql table using mysql?

AES_ENCRYPT () and AES_DECRYPT ()

21. How can we encrypt the username and password using php?

You can encrypt a password with the following Mysql>SET PASSWORD=PASSWORD("Password");
We can encode data using base64_encode($string) and can decode using base64_decode($string);

22. What are the features and advantages of OBJECT ORIENTED PROGRAMMING?

One of the main advantages of OO programming is its ease of modification; objects can easily be modified and added to a system there by reducing maintenance costs. OO programming is also considered to be better at modeling the real world than is procedural programming. It allows for more complicated and flexible interactions. OO systems are also easier for non-technical personnel to understand and easier for them to participate in the maintenance and enhancement of a system because it appeals to natural human cognition patterns.
For some systems, an OO approach can speed development time since many objects are standard across systems and can be reused. Components that manage dates, shipping, shopping carts, etc. can be purchased and easily modified for a specific system.

23. What are the differences between PROCEDURE ORIENTED LANGUAGES and OBJECT ORIENTED LANGUAGES?

Traditional programming has the following characteristics:

Functions are written sequentially, so that a change in programming can affect any code that follows it.
If a function is used multiple times in a system (i.e., a piece of code that manages the date), it is often simply cut and pasted into each program (i.e., a change log, order function, fulfillment system, etc). If a date change is needed (i.e., Y2K when the code needed to be changed to handle four numerical digits instead of two), all these pieces of code must be found, modified, and tested.
Code (sequences of computer instructions) and data (information on which the instructions operates on) are kept separate. Multiple sets of code can access and modify one set of data. One set of code may rely on data in multiple places. Multiple sets of code and data are required to work together. Changes made to any of the code sets and data sets can cause problems through out the system.

Object-Oriented programming takes a radically different approach:

Code and data are merged into one indivisible item – an object (the term "component" has also been used to describe an object.) An object is an abstraction of a set of real-world things (for example, an object may be created around "date") The object would contain all information and functionality for that thing (A date
object it may contain labels like January, February, Tuesday, Wednesday. It may contain functionality that manages leap years, determines if it is a business day or a holiday, etc., See Fig. 1). Ideally, information about a particular thing should reside in only one place in a system. The information within an object is encapsulated (or hidden) from the rest of the system.
A system is composed of multiple objects (i.e., date function, reports, order processing, etc., See Fig 2). When one object needs information from another object, a request is sent asking for specific information. (for example, a report object may need to know what today’s date is and will send a request to the date object) These requests are called messages and each object has an interface that manages messages.
OO programming languages include features such as "class", "instance", "inheritance", and "polymorphism" that increase the power and flexibility of an object.

24. What is the use of friend function?

Friend functions
Sometimes a function is best shared among a number of different classes. Such functions can be declared either as member functions of one class or as global functions. In either case they can be set to be friends of other classes, by using a friend specifier in the class that is admitting them. Such functions can use all attributes of the class whichnames them as a friend, as if they were themselves members of that class.
A friend declaration is essentially a prototype for a member function, but instead of requiring an implementation with the name of that class attached by the double colon syntax, a global function or member function of another class provides the match.

class mylinkage
{
private:
mylinkage * prev;
mylinkage * next;

protected:
friend void set_prev(mylinkage* L, mylinkage* N);
void set_next(mylinkage* L);

public:
mylinkage * succ();
mylinkage * pred();
mylinkage();
};

void mylinkage::set_next(mylinkage* L) { next = L; }

void set_prev(mylinkage * L, mylinkage * N ) { N->prev = L; }

Friends in other classes

It is possible to specify a member function of another class as a friend as follows:

class C
{
friend int B::f1();
};
class B
{
int f1();
};

It is also possible to specify all the functions in another class as friends, by specifying the entire class as a friend.

class A
{
friend class B;
};

Friend functions allow binary operators to be defined which combine private data in a pair of objects. This is particularly powerful when using the operator overloading features of C++. We will return to it when we look at overloading.

25. What are the differences between public, private, protected, static, transient, final and volatile?
element Class Interface
Data field Method Constructor
modifier top level nested top level nested
(outer) (inner) (outer) (inner)
final yes yes no yes yes no no
private yes yes yes no yes no yes
protected yes yes yes no yes no yes
public yes yes yes yes yes yes yes
static yes yes no no yes no yes
transient yes no no no no no no
volatile yes no no no no no no

26. What are the different types of errors in php?

Three are three types of errors:

1. Notices: These are trivial, non-critical errors that PHP encounters while executing a script - for example, accessing a variable that has not yet been defined. By default, such errors are not displayed to the user at all - although, as you will see, you can change this default behaviour.

2. Warnings: These are more serious errors - for example, attempting to include() a file which does not exist. By default, these errors are displayed to the user, but they do not result in script termination.

3. Fatal errors: These are critical errors - for example, instantiating an object of a non-existent class, or calling a non-existent function. These errors cause the immediate termination of the script, and PHP's default behaviour is to display them to the user when they take place.

27. What is the functionality of the function strstr and stristr?

strstr() returns part of a given string from the first occurrence of a given substring to the end of the string. For example: strstr("user@example.com","@") will return "@example.com".
stristr() is idential to strstr() except that it is case insensitive.

28. What are the differences between PHP 3 and PHP 4 and PHP 5?

Go read the release notes at http://php.net.

29. How can we convert asp pages to php pages?

You can download asp2php front-end application from the site http://asp2php.naken.cc.

30. What is the functionality of the function htmlentities?

Answer: htmlentities — Convert all applicable characters to HTML entities
This function is identical to htmlspecialchars() in all ways, except with htmlentities(), all characters which have HTML character entity equivalents are translated into these entities.

31. How can we get second of the current time using date function?

$second = date("s");

32. How can we convert the time zones using php?

33. What is meant by urlencode and urldocode?

urlencode() returns the URL encoded version of the given string. URL coding converts special characters into % signs followed by two hex digits. For example: urlencode("10.00%") will return "10%2E00%25?. URL encoded strings are safe to be used as part of URLs.
urldecode() returns the URL decoded version of the given string.

34. What is the difference between the functions unlink and unset?

unlink() deletes the given file from the file system.
unset() makes a variable undefined.

35. How can we register the variables into a session?

We can use the session_register ($ur_session_var) function.

36. How can we get the properties (size, type, width, height) of an image using php image functions?

To know the Image type use exif_imagetype () function
To know the Image size use getimagesize () function
To know the image width use imagesx () function
To know the image height use imagesy() function

37. How can we get the browser properties using php?

38. What is the maximum size of a file that can be uploaded using php and how can we change this?

You can change maximum size of a file set upload_max_filesize variable in php.ini file

39. How can we increase the execution time of a php script?

Set max_execution_time variable in php.ini file to your desired time in second.

40. How can we take a backup of a mysql table and how can we restore it.?
Answer: Create a full backup of your database: shell> mysqldump –tab=/path/to/some/dir –opt db_name Or: shell> mysqlhotcopy db_name /path/to/some/dir
The full backup file is just a set of SQL statements, so restoring it is very easy:

shell> mysql "."Executed";
mysql_close($link2);

41. How can we optimize or increase the speed of a mysql select query?

42. How many ways can we get the value of current session id?
ans:-
session_id() returns the session id for the current session.

43. How can we destroy the session, how can we unset the variable of a session?
Ans:-
session_unregister — Unregister a global variable from the current session
session_unset — Free all session variables

44. How can we destroy the cookie?
Ans:-
Set the cookie in past

45. How many ways we can pass the variable through the navigation between the pages?
Ans:-
GET or QueryString and POST

46. What is the difference between ereg_replace() and eregi_replace()?
Ans:-
eregi_replace() function is identical to ereg_replace() except that this ignores case distinction when matching alphabetic characters.eregi_replace() function is identical to ereg_replace() except that this ignores case distinction when matching alphabetic characters.

47. What are the different functions in sorting an array?
Ans:-
Sorting functions in PHP,
asort-http://www.php.net/manual/en/function.asort.php
arsort-http://www.php.net/manual/en/function.arsort.php
ksort-http://www.php.net/manual/en/function.ksort.php
krsort-http://www.php.net/manual/en/function.krsort.php
uksort-http://www.php.net/manual/en/function.uksort.php
sort-http://www.php.net/manual/en/function.sort.php
natsort-http://www.php.net/manual/en/function.natsort.php
rsort-http://www.php.net/manual/en/function.rsort.php

48. How can we know the count/number of elements of an array?
Ans:-
2 ways
a) sizeof($urarray) This function is an alias of count()
b) count($urarray)
interestingly if u just pass a simple var instead of a an array it will return 1.

49. What is the PHP predefined variable that tells the What types of images that PHP supports?

50. How can I know that a variable is a number or not using a JavaScript?

51. List out some tools through which we can draw E-R diagrams for mysql.

52. How can I retrieve values from one database server and store them in other database server using PHP?

53. List out the predefined classes in php?

Directory
stdClass
__PHP_Incomplete_Class
exception
php_user_filter

54. How can I make a script that can be bilanguage (supports Eglish, German)?

You can change charset variable in above line in the script to support bilanguage.

55. What are the difference between abstract class and interface?

Abstract class: abstract classes are the class where one or more methods are abstract but not necessarily all method has to be abstract. Abstract methods are the methods, which are declare in its class but not define. The definition of those methods must be in its extending class.

Interface: Interfaces are one type of class where all the methods are abstract. That means all the methods only declared but not defined. All the methods must be define by its implemented class.

56. How can we send mail-using JavaScript?

NO! JavaScript can't email a form! but, there are alternatives to send the form data to an email address.

57. How can we repair a mysql table?

The syntex for repairing a mysql table is
REPAIR TABLENAME, [TABLENAME, ], [Quick],[Extended]
This command will repair the table specified if the quick is given the mysql will do a repair of only the index tree if the extended is given it will create index row by row

58. What are the advantages of stored procedures, triggers, indexes?

A stored procedure is a set of SQL commands that can be compiled and stored in the server. Once this has been done, clients don't need to keep re-issuing the entire query but can refer to the stored procedure. This provides better overall performance because the query has to be parsed only once, and less information needs to be sent between the server and the client. You can also raise the conceptual level by having libraries of functions in the server. However, stored procedures of course do increase the load on the database server system, as more of the work is done on the server side and less on the client (application) side.
Triggers will also be implemented. A trigger is effectively a type of stored procedure, one that is invoked when a particular event occurs. For example, you can install a stored procedure that is triggered each time a record is deleted from a transaction table and that stored procedure automatically deletes the corresponding customer from a customer table when all his transactions are deleted.
Indexes are used to find rows with specific column values quickly. Without an index, MySQL must begin with the first row and then read through the entire table to find the relevant rows. The larger the table, the more this costs. If the table has an index for the columns in question, MySQL can quickly determine the position to seek to in the middle of the data file without having to look at all the data. If a table has 1,000 rows, this is at least 100 times faster than reading sequentially. If you need to access most of the rows, it is faster to read sequentially, because this minimizes disk seeks.

59. What is the maximum length of a table name, database name, and fieldname in mysql?

Database name- 64
Table name -64
Fieldname-64

60. How many values can the SET function of mysql takes?

Mysql set can take zero or more values but at the maximum it can take 64 values

61. What are the other commands to know the structure of table using mysql commands except explain command?

describe table_name;

Friday, May 23, 2008

Oracle Interview Questions - Part 8 Interview question

What are the components of physical database structure of Oracle database?
Oracle database is comprised of three types of files. One or more datafiles, two are more redo log files, and one or more control files.

What are the components of logical database structure of Oracle database?
There are tablespaces and database's schema objects.

What is a tablespace?
A database is divided into Logical Storage Unit called tablespaces. A tablespace is used to grouped related logical structures together.

What is SYSTEM tablespace and when is it created?
Every Oracle database contains a tablespace named SYSTEM, which is automatically created when the database is created. The SYSTEM tablespace always contains the data dictionary tables for the entire database.

Explain the relationship among database, tablespace and data file ?
Each databases logically divided into one or more tablespaces one or more data files are explicitly created for each tablespace.

What is schema?
A schema is collection of database objects of a user.

What are Schema Objects?
Schema objects are the logical structures that directly refer to the database's data. Schema objects include tables, views, sequences, synonyms, indexes, clusters, database triggers, procedures, functions packages and database links.

Can objects of the same schema reside in different tablespaces?

Yes.

Can a tablespace hold objects from different schemes?
Yes.

What is Oracle table?
A table is the basic unit of data storage in an Oracle database. The tables of a database hold all of the user accessible data. Table data is stored in rows and columns.

What is an Oracle view?
A view is a virtual table. Every view has a query attached to it. (The query is a SELECT statement that identifies the columns and rows of the table(s) the view uses.)

What is Partial Backup ?
A Partial Backup is any operating system backup short of a full backup, taken while the database is open or shut down.

What is Mirrored on-line Redo Log ?
A mirrored on-line redo log consists of copies of on-line redo log files physically located on separate disks, changes made to one member of the group are made to all members

What is Full Backup ?
A full backup is an operating system backup of all data files, on-line redo log files and control file that constitute ORACLE database and the parameter.

Can a View based on another View ?
Yes.

Can a Tablespace hold objects from different Schemes ?
Yes.

Can objects of the same Schema reside in different tablespace ?
Yes.

What is the use of Control File ?
When an instance of an ORACLE database is started, its control file is used to identify the database and redo log files that must be opened for database operation to proceed. It is also used in database recovery.

Do View contain Data ?
Views do not contain or store data.

What are the Referential actions supported by FOREIGN KEY integrity constraint ?
UPDATE and DELETE Restrict - A referential integrity rule that disallows the update or deletion of referenced data. DELETE Cascade - When a referenced row is deleted all associated dependent rows are deleted.

What are the type of Synonyms?
There are two types of Synonyms Private and Public.

What is a Redo Log ?
The set of Redo Log files YSDATE,UID,USER or USERENV SQL functions, or the pseudo columns LEVEL or ROWNUM.

What is an Index Segment ?
Each Index has an Index segment that stores all of its data.

Explain the relationship among Database, Tablespace and Data file?
Each databases logically divided into one or more tablespaces one or more data files are explicitly created for each tablespace

What are the different type of Segments ?
Data Segment, Index Segment, Rollback Segment and Temporary Segment.

What are Clusters ?
Clusters are groups of one or more tables physically stores together to share common columns and are often used together.

What is an Integrity Constrains ?
An integrity constraint is a declarative way to define a business rule for a column of a table.

What is an Index ?
An Index is an optional structure associated with a table to have direct access to rows, which can be created to increase the performance of data retrieval. Index can be created on one or more columns of a table.

What is an Extent ?
An Extent is a specific number of contiguous data blocks, obtained in a single allocation, and used to store a specific type of information.

What is a View ?
A view is a virtual table. Every view has a Query attached to it. (The Query is a SELECT statement that identifies the columns and rows of the table(s) the view uses.)

What is Table ?
A table is the basic unit of data storage in an ORACLE database. The tables of a database hold all of the user accessible data. Table data is stored in rows and columns.

What are snap shots and views
Snapshots are mirror or replicas of tables. Views are built using the columns from one or more tables. The Single Table View can be updated but the view with multi table cannot be updated

What are the OOPS concepts in Oracle.
Oracle does implement the OOPS concepts. The best example is the Property Classes. We can categorise the properties by setting the visual attributes and then attach the property classes for the objects. OOPS supports the concepts of objects and classes and we can consider the peroperty classes as classes and the items as objects

What is the difference between candidate key, unique key and primary key
Candidate keys are the columns in the table that could be the primary keys and the primary key is the key that has been selected to identify the rows. Unique key is also useful for identifying the distinct rows in the table.)

What is concurrency
Concurrency is allowing simultaneous access of same data by different users. Locks useful for accesing the database are
a) Exclusive
The exclusive lock is useful for locking the row when an insert,update or delete is being done.This lock should not be applied when we do only select from the row.
b) Share lock
We can do the table as Share_Lock as many share_locks can be put on the same resource.

Previleges and Grants
Previleges are the right to execute a particulare type of SQL statements. e.g :: Right to Connect, Right to create, Right to resource Grants are given to the objects so that the object might be accessed accordingly.The grant has to be given by the owner of the object

Table Space,Data Files,Parameter File, Control Files

Table Space :: The table space is useful for storing the data in the database.When a database is created two table spaces are created.
a) System Table space :: This data file stores all the tables related to the system and dba tables
b) User Table space :: This data file stores all the user related tables
We should have seperate table spaces for storing the tables and indexes so that the access is fast.
Data Files :: Every Oracle Data Base has one or more physical data files.They store the data for the database.Every datafile is associated with only one database.Once the Data file is created the size cannot change.To increase the size of the database to store more data we have to add data file.
Parameter Files :: Parameter file is needed to start an instance.A parameter file contains the list of instance configuration parameters e.g.::
db_block_buffers = 500
db_name = ORA7
db_domain = u.s.acme lang
Control Files :: Control files record the physical structure of the data files and redo log files
They contain the Db name, name and location of dbs, data files ,redo log files and time stamp.

Physical Storage of the Data
The finest level of granularity of the data base are the data blocks.
Data Block :: One Data Block correspond to specific number of physical database space
Extent :: Extent is the number of specific number of contigious data blocks.
Segments :: Set of Extents allocated for Extents. There are three types of Segments
a) Data Segment :: Non Clustered Table has data segment data of every table is stored in cluster data segment
b) Index Segment :: Each Index has index segment that stores data
c) Roll Back Segment :: Temporarily store 'undo' information

What are the Pct Free and Pct Used
Pct Free is used to denote the percentage of the free space that is to be left when creating a table. Similarly Pct Used is used to denote the percentage of the used space that is to be used when creating a table
eg.:: Pctfree 20, Pctused 40

What is Row Chaining
The data of a row in a table may not be able to fit the same data block.Data for row is stored in a chain of data blocks .

What is a 2 Phase Commit
Two Phase commit is used in distributed data base systems. This is useful to maintain the integrity of the database so that all the users see the same values. It contains DML statements or Remote Procedural calls that reference a remote object. There are basically 2 phases in a 2 phase commit.
a) Prepare Phase :: Global coordinator asks participants to prepare
b) Commit Phase :: Commit all participants to coordinator to Prepared, Read only or abort Reply

What is the difference between deleting and truncating of tables
Deleting a table will not remove the rows from the table but entry is there in the database dictionary and it can be retrieved But truncating a table deletes it completely and it cannot be retrieved.

What are mutating tables
When a table is in state of transition it is said to be mutating. eg :: If a row has been deleted then the table is said to be mutating and no operations can be done on the table except select.

What are Codd Rules
Codd Rules describe the ideal nature of a RDBMS. No RDBMS satisfies all the 12 codd rules and Oracle Satisfies 11 of the 12 rules and is the only Rdbms to satisfy the maximum number of rules.

What is Normalisation
Normalisation is the process of organising the tables to remove the redundancy.There are mainly 5 Normalisation rules.
a) 1 Normal Form :: A table is said to be in 1st Normal Form when the attributes are atomic
b) 2 Normal Form :: A table is said to be in 2nd Normal Form when all the candidate keys are dependant on the primary key
c) 3rd Normal Form :: A table is said to be third Normal form when it is not dependant transitively

What is the Difference between a post query and a pre query
A post query will fire for every row that is fetched but the pre query will fire only once.

Deleting the Duplicate rows in the table
We can delete the duplicate rows in the table by using the Rowid

Can U disable database trigger? How?
Yes. With respect to table
ALTER TABLE TABLE
[[ DISABLE all_trigger ]]

What is pseudo columns ? Name them?
A pseudocolumn behaves like a table column, but is not actually stored in the table. You can select from pseudocolumns, but you cannot insert, update, or delete their values. This section describes these pseudocolumns:
* CURRVAL
* NEXTVAL
* LEVEL
* ROWID
* ROWNUM

How many columns can table have?
The number of columns in a table can range from 1 to 254.

Is space acquired in blocks or extents ?
In extents .

What is clustered index?
In an indexed cluster, rows are stored together based on their cluster key values . Can not applied for HASH.

What are the datatypes supported By oracle (INTERNAL)?
Varchar2, Number,Char , MLSLABEL.

What are attributes of cursor?
%FOUND , %NOTFOUND , %ISOPEN,%ROWCOUNT

Can you use select in FROM clause of SQL select ?
Yes.

Which trigger are created when master -detail relay?
master delete property
* NON-ISOLATED (default)
a) on check delete master
b) on clear details
c) on populate details
* ISOLATED
a) on clear details
b) on populate details
* CASCADE
a) per-delete
b) on clear details
c) on populate details

which system variables can be set by users?
SYSTEM.MESSAGE_LEVEL
SYSTEM.DATE_THRESHOLD
SYSTEM.EFFECTIVE_DATE
SYSTEM.SUPPRESS_WORKING

What are object group?
An object group is a container for a group of objects. You define an object group when you want to package related objects so you can copy or reference them in another module.

What are referenced objects?
Referencing allows you to create objects that inherit their functionality and appearance from other objects. Referencing an object is similar to copying an object, except that the resulting reference object maintains a link to its source object. A reference object automatically inherits any changes that have been made to the source object when you open or regenerate the module that contains the reference object.

Can you store objects in library?
Referencing allows you to create objects that inherit their functionality and appearance from other objects. Referencing an object is similar to copying an object, except that the resulting reference object maintains a link to its source object. A reference object automatically inherits any changes that have been made to the source object when you open or regenerate the module that contains the reference object.

Is forms 4.5 object oriented tool ? why?
yes , partially. 1) PROPERTY CLASS - inheritance property 2) OVERLOADING : procedures and functions.

Can you issue DDL in forms?
yes, but you have to use FORMS_DDL.
Referencing allows you to create objects that inherit their functionality and appearance from other objects. Referencing an object is similar to copying an object, except that the resulting reference object maintains a link to its source object. A reference object automatically inherits any changes that have been made to the source object when you open or regenerate the module that contains the reference object. Any string expression up to 32K:
- a literal
- an expression or a variable representing the text of a block of dynamically created PL/SQL code
- a DML statement or
- a DDL statement
Restrictions:
The statement you pass to FORMS_DDL may not contain bind variable references in the string, but the values of bind variables can be concatenated into the string before passing the result to FORMS_DDL.

What is SECURE property?
- Hides characters that the operator types into the text item. This setting is typically used for password protection.

What are the types of triggers and how the sequence of firing in text item
Triggers can be classified as Key Triggers, Mouse Triggers ,Navigational Triggers.
Key Triggers :: Key Triggers are fired as a result of Key action.e.g :: Key-next-field, Key-up,Key-Down
Mouse Triggers :: Mouse Triggers are fired as a result of the mouse navigation.e.g. When-mouse-button-presed,when-mouse-doubleclicked,etc
Navigational Triggers :: These Triggers are fired as a result of Navigation. E.g. : Post-Text-item,Pre-text-item.
We also have event triggers like when ?new-form-instance and when-new-block-instance.
We cannot call restricted procedures like go_to(?my_block.first_item?) in the Navigational triggers
But can use them in the Key-next-item.
The Difference between Key-next and Post-Text is an very important question. The key-next is fired as a result of the key action while the post text is fired as a result of the mouse movement. Key next will not fire unless there is a key event. The sequence of firing in a text item are as follows ::
a) pre - text
b) when new item
c) key-next
d) when validate
e) post text

Can you store pictures in database? How?
Yes , in long Raw datatype.

What are property classes ? Can property classes have trigger?
Property class inheritance is a powerful feature that allows you to quickly define objects that conform to your own interface and functionality standards. Property classes also allow you to make global changes to applications quickly. By simply changing the definition of a property class, you can change the definition of all objects that inherit properties from that class.
Yes . All type of triggers .

If you have property class attached to an item and you have same trigger written for the item . Which will fire first?
Item level trigger fires , If item level trigger fires, property level trigger won't fire. Triggers at the lowest level are always given the first preference. The item level trigger fires first and then the block and then the Form level trigger.

What are record groups ? * Can record groups created at run-time?
A record group is an internal Oracle Forms data structure that has a column/row framework similar to a database table. However, unlike database tables, record groups are separate objects that belong to the form module in which they are defined. A record group can have an unlimited number of columns of type CHAR, LONG, NUMBER, or DATE provided that the total number of columns does not exceed 64K. Record group column names cannot exceed 30 characters.
Programmatically, record groups can be used whenever the functionality offered by a two-dimensional array of multiple data types is desirable.
TYPES OF RECORD GROUP:
Query Record Group A query record group is a record group that has an associated SELECT statement. The columns in a query record group derive their default names, data types, and lengths from the database columns referenced in the SELECT statement. The records in a query record group are the rows retrieved by the query associated with that record group.
Non-query Record Group A non-query record group is a group that does not have an associated query, but whose structure and values can be modified programmatically at runtime.
Static Record Group A static record group is not associated with a query; rather, you define its structure and row values at design time, and they remain fixed at runtime.

What are ALERT?
An ALERT is a modal window that displays a message notifying operator of some application condition.

Can a button have icon and label at the same time ?
-NO

What is mouse navigate property of button?
When Mouse Navigate is True (the default), Oracle Forms performs standard navigation to move the focus to the item when the operator activates the item with the mouse.
When Mouse Navigate is set to False, Oracle Forms does not perform navigation (and the resulting validation) to move to the item when an operator activates the item with the mouse.

What is FORMS_MDI_WINDOW?
forms run inside the MDI application window. This property is useful for calling a form from another one.

What are timers ? when when-timer-expired does not fire?
The When-Timer-Expired trigger can not fire during trigger, navigation, or transaction processing.

Can object group have a block?
Yes , object group can have block as well as program units.

How many types of canvases are there.
There are 2 types of canvases called as Content and Stack Canvas. Content canvas is the default and the one that is used mostly for giving the base effect. Its like a plate on which we add items and stacked canvas is used for giving 3 dimensional effect.

What are user-exits?
It invokes 3GL programs.

Can you pass values to-and-fro from foreign function ? how ?
Yes . You obtain a return value from a foreign function by assigning the return value to an Oracle Forms variable or item. Make sure that the Oracle Forms variable or item is the same data type as the return value from the foreign function.
After assigning an Oracle Forms variable or item value to a PL/SQL variable, pass the PL/SQL variable as a parameter value in the PL/SQL interface of the foreign function. The PL/SQL variable that is passed as a parameter must be a valid PL/SQL data type; it must also be the appropriate parameter type as defined in the PL/SQL interface.

What is IAPXTB structure ?
The entries of Pro * C and user exits and the form which simulate the proc or user_exit are stored in IAPXTB table in d/b.

Can you call WIN-SDK thru user exits?
YES.

Monday, May 19, 2008

Software Testing Interview Questions

Chapter 1: Software Testing Basics
· In which Software Life cycle phase does testing occur?
· Can you explain PDCA cycle and where does testing fit?
· What is the difference between white box, black box and gray box testing?
· Define Defect?
· What is the difference between Defect and Failure?
· What are the broader categories of defects?
· What is the difference between Verification and Validation?
· How does testing affect risk?
· Does Increase in testing always mean good to the project?
· As a manager what process did you adopt to define testing policy?
· Should testing be only after build and execution?
· Are number of defects more in design phase or coding phase?
· What kind of inputs do we need from the end user to start proper testing?
· What is the difference between Latent and Masked Defect?
· A defect which could have been removed during initial stage is removed in later
stage how does it affect cost?
· In testing can you explain the concept of work bench?
· What’s the difference between Alpha and Beta testing?
· Can you explain the concept of defect cascading?
· Can you explain how one defect leads to other defects?
· Can you explain what is Usability testing?
· What are the different strategies of rollout to the end users?
· Can you explain requirement traceability and its importance?
· What is the difference between Pilot and Beta testing?
· How will you do a risk analysis during software testing?
· How do you conclude which section is most risky in your application?
· What does entry and exit criteria mean in a project?
· On what basis is the Acceptance plan prepared?
· What’s the relation between environment reality and test phases?
· What are different types of verifications?
· What’s the difference between Inspections and Walkthroughs?
· Can you explain regression testing and confirmation testing?
· What do you mean by coverage and what are the different types of coverage
techniques?
· How does fundamentally a coverage tool work?
· What is configuration management?
· Can you explain the concept of baseline in software development?
· What are the different test plan documents in project?
· How do test documents in a project span across software development life cycle?
· Can you explain inventories?
· How do you do Analysis and design for testing projects?
· Can you explain calibration?
· Which test cases are first written white boxes or black box?
· Can you explain Co-habiting software?
· What different impact rating’s you have used in your project?
· Can you explain what a test log is?
· Explain SDLC (Software development Life Cycle) in detail?
· Can you explain waterfall model?
· Can you explain big-bang waterfall model?
· Can you explain phased waterfall model?
· Explain Iterative model, Incremental model, Spiral model, Evolutionary model
and V-Model?
· Explain Unit testing, Integration tests, System testing and Acceptance testing?
· What’s the difference between system and acceptance testing?
· Which is the best model?
· What group of teams can do software testing?
Chapter 2: Testing techniques
· Can you explain boundary value analysis?
· What is BV in software testing?
· Can you explain Equivalence partitioning?
· Can you explain how state transition diagram can be helpful during testing?
· Can you explain random testing?
· Can you explain monkey testing?
· What is negative and positive testing?
· Can you explain exploratory testing?
· What exactly are semi-random test cases?
· Can you explain the concept of orthogonal array?
· Can you explain pair-wise defect fundamental?
· Can you explain the concept of decision tables?
· How did you define severity ratings in your project?
Chapter 3: Software process
· What is a Software process?
· What are the different cost element involved in implementing process in an
organization?
· What is a model?
· What is maturity level?
· Can you explain the concept of process area in CMMI?
· Can you explain the concept of tailoring?
Chapter 4: CMMI
· What is CMMI and what's the advantage of implementing CMMI in an
organization?
· What’s the difference between implementation and Institutionalization?
· What are different models in CMMI?
· Can you explain staged and continuous models in CMMI?
· Can you explain the different maturity levels in staged representation?
· Can you explain capability levels in continuous representation?
· Which model should we use and under what scenarios?
· How many process areas are present in CMMI and in what classification do they
fall in?
· What the difference between every level in CMMI?
· What different sources are needed to verify authenticity for CMMI
implementation?
· Can you explain SCAMPI process?
· How is appraisal done in CMMI?
· Which appraisal method class is the best?
· Can you explain the importance of PII in SCAMPI?
· Can you explain implementation of CMMI in one of the Key process areas?
· Explanation of all process areas with goals and practices?
· Can you explain the process areas?
Chapter 5: Six Sigma
· What is six sigma?
· Can you explain the different methodology for execution and design process in
SIX sigma?
· What does executive leaders, champions, Master Black belt, green belts and black
belts mean?
· What are the different kinds of variations used in six sigma?
· Can you explain the concept of standard deviation?
· Can you explain the concept of fish bone/ Ishikawa diagram?
· Can you explain QFD?
· Can you explain FMEA?
· Can you explain X bar charts?
· Can you explain Flow charting and brain storming?
Chapter 6: Metrics
· What is meant by measure and metrics?
· Can you explain Number of defects measure?
· Can you explain number of production defects measure?
· Can you explain defect seeding?
· Can you explain DRE?
· Can you explain Unit and system test DRE?
· How do you measure test effectiveness?
· Can you explain Defect age and Defect spoilage?
Chapter 7: Automated Testing
· What are good candidate for automation in testing?
· Does automation replace manual testing?
· Which automation tool have you worked and can you explain them in brief?
· Can you explain how does load testing conceptually work for websites?
· Can you explain how did you perform load testing using tool?
· What does load test summary report contain?
· Can you explain the concept of data-driven testing?
· Can you explain table-driven testing?
· How can you perform data-driven testing using Automated QA?
Chapter 8: Testing Estimation
· What are the different ways of doing black box testing?
· Can you explain TPA analysis?
· Can you explain in brief Function points?
· Can you explain the concept Application boundary?
· Can you explain the concept of elementary process?
· Can you explain the concept of static and dynamic elementary process?
· Can you explain concept of FTR, ILF, EIF, EI, EO, EQ and GSC?
· How can you estimate number of acceptance test cases in a project?
· Can you explain on what basis does TPA actually work?
· How did you do estimation for black box testing?
· How did you estimate white box testing?
· Is there a way to estimate acceptance test cases in a system?