Job Roles

Q:

How to create a basic text file in php?

Answer

$filename = "/home/user/guest/newfile.txt";
$file = fopen( $filename, "w" );
if( $file == false )
{
echo ( "Error in opening new file" );
exit();


}
fwrite( $file, "This is a simple test\n" );
fclose( $file );

Report Error

View answer Workspace Report Error Discuss

Subject: PHP
Job Role: IT Trainer

1 4108
Q:

What's the difference between Session and Cookie?

Answer

The principle distinction amongst sessions and cookies is that sessions are put away on the server, and cookies are put away on the client's PCs in the content record position. Cookies can not hold various variables,But Session can hold numerous variables.We can set expiry for a cookie,The session just stays dynamic the length of the program is open.Users don't have admittance to the information you put away in Session,Since it is put away in the server. Session is mostly utilized for login/logout reason while cookies utilizing for client movement following.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP
Job Role: Database Administration

1 3505
Q:

What is the purpose $_PHP_SELF variable?

Answer

The PHP default variable $_PHP_SELF is utilized for the PHP script name and when you click "submit" catch then same PHP script will be called.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP
Job Role: IT Trainer

2 5625
Q:

What's the difference between GET() and POST() method?

Answer

We can send 1024 bytes utilizing GET() yet POST() can exchange extensive measure of information and POST is the protected strategy than GET technique .

Report Error

View answer Workspace Report Error Discuss

Subject: PHP
Job Role: Database Administration

1 3532
Q:

What is the difference between _construct() and _destruct() methods in php?

Answer

These two methods are bulid-in methods  in php. with  construct() we can overwride the parent class method. The inverse of the __construct() PHP capacity while making another class, is the __destruct() technique. The __destruct() technique will consequently keep running, after you've completed with the PHP class.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP
Job Role: Software Architect

1 3275
Q:

In a certain office, 1/3 of workers are women, 1/2 of the women are married and 1/3 of the married women have children. If 3/4  of the men are married and 2/3  of the married men have children, what part of the workers are without children?

A) 5/18 B) 4/9
C) 11/18 D) 17/36
 
Answer & Explanation Answer: C) 11/18

Explanation:

Let the total number of workers be x. Then, 

 

Number of women = x/3 and number of men = x - x/3  = 2x/3

 

Number of women having children = x/18

 

Number of men having children = x/3

 

Number of workers having children = (x/18) + (x/3) = 7x/18

  

Therefore, workers having no children = x - 7x/18 = 11/18 of all workers.

Report Error

View Answer Report Error Discuss

Filed Under: Arithmetical Reasoning
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

62 22612
Q:

In a Certain Country 1/2 of 5 = 3. If the same proportion holds, what is the value of 1/3 of 10 ?

A) 4 B) 6
C) 8 D) 10
 
Answer & Explanation Answer: A) 4

Explanation:

Let 1310 = x 

=> 3x = 10

 

Given that 125=3

 

Therefore, 52x = 10 

 

=> x = 10/3 = 4.

Report Error

View Answer Report Error Discuss

Filed Under: Math Puzzles
Exam Prep: CAT , Bank Exams , AIEEE
Job Role: Bank Clerk

19 8663
Q:

A women goes to market with Rs.500 to buy oranges.the prices of the oranges have decreased by 10% so he could buy 2kg more with the amount she had.What was the original price of the oranges ?

A) 22.77 B) 25.77
C) 27.77 D) 29.77
 
Answer & Explanation Answer: C) 27.77

Explanation:

If the price of the oranges decreases by 10%, the woman would save 10% of the money that is Rs.50 to buy the same amount as before.Now in Rs. 50 she can buy 2 kg more, therefore the current price of 1 kg of oranges is Rs25.Now, this current price is after 10% reduction.

 

 

 

Therefore, the original price =  25/0.9  = Rs. 27.77

Report Error

View Answer Report Error Discuss

Filed Under: Profit and Loss
Exam Prep: CAT , Bank Exams
Job Role: Bank Clerk

37 10902