Interview Questions

Q:

How can we extract string "abc.com" from a string "https://info@abc.com" using regular _expression of php?

Answer

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

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 4299
Q:

How to convert JSON Text to a JavaScript Object ?

Answer

One of the most common use of JSON is to fetch JSON data from a web server (as a file or as an HttpRequest), convert the JSON data to a JavaScript object, and then it uses the data in a web page.


The eval() function can compile and execute any JavaScript. This represents a potential security problem.


It is safer to use a JSON parser to convert a JSON text to a JavaScript object. A JSON parser will recognize only JSON text and will not compile scripts.

Report Error

View answer Workspace Report Error Discuss

2 4287
Q:

DOM stands for

A) Document object model B) Data object model
C) Document Oriented model D) Data oriented model
 
Answer & Explanation Answer: A) Document object model

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Web Technology

0 4286
Q:

What is conversion operator ?

Answer

Class can have a public method for specific data type conversions.
for example:
class B
{
double value;
public  B(int i )
operator double()
{
return value;
}
};
B BObject;
double i = BObject; // assigning object to variable i of type double.
now conversion operator gets called to assign the value.

Report Error

View answer Workspace Report Error Discuss

11 4278
Q:

What is DataStage?

Answer

- A tool for designing Extraction, Transformation and Loading


- An ideal tool for data integration projects system migrations


- Importing, extracting and creating metadata are within these jobs


- Data stage allows scheduling, monitoring and running the jobs 


- Allows to administer the development and execution in a single environment


 

Report Error

View answer Workspace Report Error Discuss

1 4270
Q:

What is meant by exception specification?

A) A function is limited to throwing only a specified list of exceptions. B) A catch can catch all types of exceptions.
C) A function can throw any type of exceptions. D) none of the mentioned
 
Answer & Explanation Answer: A) A function is limited to throwing only a specified list of exceptions.

Explanation:

C++ provides a mechanism to ensure that a given function is limited to throwing only a specified list of exceptions. It is called as exception specification.

Report Error

View Answer Report Error Discuss

Filed Under: C++

0 4269
Q:

 Which is the largest foreign bank in India   ?

A) HDFC Bank B) American Express Bank Ltd
C) DBS Bank Ltd D) Standard Chartered Bank
 
Answer & Explanation Answer: D) Standard Chartered Bank

Explanation:

Standard Chartered Bank 
Standard Chartered Bank have been operating in India since 1858.

Report Error

View Answer Report Error Discuss

Filed Under: Bank Interview
Exam Prep: Bank Exams , CAT
Job Role: Bank Clerk , Bank PO

5 4264
Q:

What are the difference between in-stream procedure and inline procedure in JCL ?

Answer

An in-stream PROC is defined right in the jcl stream and doesn't reside in the proclib. This is an older technique associated with punched cards but it is still in use with setup and installation programs from vendors.


for the in-line perform instead of:


perform add-paragraph until switch = 'y'


you can code


perform until switch = 'y'


body of code


end-perform


body of code is the code from add-paragraph appearing in-line (ie right in the perform) instead of in a separate paragraph (out of line code)

Report Error

View answer Workspace Report Error Discuss

1 4264