IT Trainer Questions


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 4293
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 4284
Q:

On simple interest an amount becomes Rs. 812 in two years and Rs. 924 in four years. What is the rate of interest on that amount?

A) 7.2% B) 8%
C) 8.5% D) 9.3%
 
Answer & Explanation Answer: B) 8%

Explanation:

We know, 

S.I = PTR/100 where P = principal amount, T = time, R = rate of interest

Here in the given data,

Interest for two years S.I = 924 - 812 = Rs. 112

Now, Principal amount P = 812 - 112 = Rs. 700 

Now,

R = S.I x 100/PT

R = 112 x 100/700 x 2

R = 11200/1400

R = 8%

 

Hence, the rate of interest R = 8%.

Report Error

View Answer Report Error Discuss

7 4273
Q:

In latest generation computers, the instructions are executed

A) Sequentially only B) Parallelly only
C) Both sequentially and parallelly D) None of the above
 
Answer & Explanation Answer: C) Both sequentially and parallelly

Explanation:

In_latest_generation_computers,_the_instructions_are_executed1556257673.jpg image

 

In latest generation computers, the instructions are executed both sequencially and parallelly.

Report Error

View Answer Report Error Discuss

3 4270
Q:

What is the most important step in prioritizing goals?

A) deciding what is most important B) having multiple tasks lined up for each goal
C) determining categories for various goals D) writing a list of goals
 
Answer & Explanation Answer: A) deciding what is most important

Explanation:

Always prioritize by what's most important to what is less important to us to reach our goals as soon as possible.

Report Error

View Answer Report Error Discuss

3 4256
Q:

Which planet rotates clockwise?

A) Uranus B) Saturn
C) Venus D) Earth
 
Answer & Explanation Answer: C) Venus

Explanation:

Venus is the only planet that rotates in clockwise where all other planets in the solar system rotates in anti - clockwise direction.

 

which_planet_rotates_clockwise1556602727.jpg image

Report Error

View Answer Report Error Discuss

6 4245
Q:

The command to eliminate a table from a database is

A) REMOVE TABLE CUSTOMER; B) UPDATE TABLE CUSTOMER;
C) DELETE TABLE CUSTOMER; D) DROP TABLE CUSTOMER;
 
Answer & Explanation Answer: D) DROP TABLE CUSTOMER;

Explanation:

The SQL DROP TABLE statement is used to remove a table definition and all data, indexes,...

Report Error

View Answer Report Error Discuss

4 4224
Q:

Component Testing is also called as

component_testing_is_also_called_as1542088267.jpg image

A) Unit testing B) Module testing
C) Program testing D) All of the above
 
Answer & Explanation Answer: D) All of the above

Explanation:

Component Testing is also called as Module or Unit or Program testing. It is testing of all the components in an application separately.

Report Error

View Answer Report Error Discuss

6 4213