Interview Questions

Home >>

Q.

 


Answer :
Public: Public declared items can be accessed everywhere.
Protected: Protected limits access to inherit and praent classes.
Private: Private limits visibility only to the class that defines the item.
Static: A static variable exists only in a local function scope, but it does not loose its value when program execution leaves the scope.
Transient: A transient variable is a variable that may not be serialized.
Volatile: A variable that might be concurrently modified by multiple threads should be declared volatile.
Variables declared as volatile will not be optimized by the compiler because there value can change at any time.
Posted By : app101
Probably one server has a 64 bit processor. The GetInt4d bit shift doesn't work with 64 bit processors.

Andreas Rehm hacked it to ensure correct result of the <<24 block on 32 and 64bit systems, just replace the code of the GetInt4d function with the following:

$_or_24 = ord($data[$pos+3]);

if ($_or_24>=128)
$_ord_24 = -abs((256-$_or_24) << 24);
else
$_ord_24 = ($_or_24&127) << 24;

return ord($data[$pos]) | (ord($data[$pos+1]) << 8) | (ord($data[$pos+2]) << 16) | $_ord_24;
Posted By : app101
Post Answer :  
Answer * :
Are You? Already a Member New User
   
User Name / Email * :
Password * :
Security Code * :

(Enter security code above shown on image)