Interview Questions

Q:

For printing out strings, there are echo, print and printf. Explain the differences.

Answer - echo is the most primitive of them, and just outputs the contents following the construct to the screen. print is also a construct (so parentheses are optional when calling it), but it returns TRUE on successful output and FALSE if it was unable to print out the string. However, you can pass multiple parameters to echo, like:

and it will output the string "Welcome to TechInterviews!" print does not take multiple parameters. It is also generally argued that echo is faster, but usually the speed advantage is negligible, and might not be there for future versions of PHP. printf is a function, not a construct, and allows such advantages as formatted output, but it’s the slowest way to print out data out of echo, print and printf.
Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 3270
Q:

How to create recursive query in SQL Server?

Answer

Recursive query can be create in SQL using stored procedure but you can also use CTE (Common table expression). It might be also worth asking about performance as CTE is not always very fast.

Report Error

View answer Workspace Report Error Discuss

Subject: SQL

0 3269
Q:

What is the difference between finance and accounts? most of the companies having a different section like finance and accounts. why they aren't had only single section neither finance nor accounts?

Answer

Finance:It is the branch of economics that studies the management of money and other assets.In simpler terms it can be defined as the commercial activity of providing funds and capital.It addresses questions like -- what funds are required by the org & How they can be raised &  How they have to be allocated etc.


Accounts: It is the occupation of maintaining and auditing records and preparing financial reports for a business. Accounts provides quantitative information about finances. It addresses issues like what amount of funds have been allocated to various activities, how the book-keeping is being done etc.


Both functions are distinct but complimentary to each other.


Finance and accounts are highly specilized and distinct areas and hence most organizations have seperate sections of finance and accounts.

Report Error

View answer Workspace Report Error Discuss

0 3262
Q:

Which of the following is not economic investment?

A) the piling up of inventories on a grocer's shelf B) the purchase of a drill press by the Ajax Manufacturing Company
C) construction of a suburban housing project D) the purchase of 100 shares of AT&T by a retired business executive
 
Answer & Explanation Answer: D) the purchase of 100 shares of AT&T by a retired business executive

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Accounts Receivable
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

1 3260
Q:

How is sign stored in a COMP field?

Answer

It is stored in the most significant bit. Bit is ON if -ve, OFF if +ve.

Report Error

View answer Workspace Report Error Discuss

1 3260
Q:

What is data cleaning? How can we do that?

Answer

Data cleaning is also known as data scrubbing. Data cleaning is a process which ensures the set of data is correct and accurate. Data accuracy and consistency, data integration is checked during data cleaning. Data cleaning can be applied for a set of records or multiple sets of data which need to be merged.


Data cleaning is performed by reading all records in a set and verifying their accuracy. Typos and spelling errors are rectified. Mislabeled data if available is labeled and filed. Incomplete or missing entries are completed. Unrecoverable records are purged, for not to take space and inefficient operations.

Report Error

View answer Workspace Report Error Discuss

0 3259
Q:

What is the managed execution process?

Answer

Managed execution process is a process where CLR executes the managed code. The steps involved in this process are:



  1.  Choosing the right compiler

  2.  Compiling the code to MSIL. This also generates the required metadata.

  3.  Compile the MSIL ode to native machine code.

  4. Executing the code with the variety of services available

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

0 3252
Q:

Write code snippet to retrieve IMEI number of Android phone?

Answer

TelephonyManager class can be used to get the IMEI number. It provides access to information about the telephony services on the device.


Code


        TelephonyManager mTelephonyMgr = (TelephonyManager)


        getSystemService(Context.TELEPHONY_SERVICE);


        String imei = mTelephonyMgr.getDeviceId();

Report Error

View answer Workspace Report Error Discuss

0 3248