1. What are static variables? Static variable in a function only remain one copy of itself. Static variable in a module can be used by any function in the module Static function can only be called in its class 2. What are volatile variables? Volatile variables may change its value unexpectedly in the program. The program will check its value every time, it tries to use it. If a variable is not volatile, the program may keep a copy of the var in its cache. 3. What do you mean by const keyword ? A constant variable is a read only variable. You cant change its value else where except initialization. 4. What is interrupt latency? Interrupt latency is the time between the generation of interrupt and the time for interrupt handler to process it. 5. How you can optimize it? We may use polling and message passing for interrupt to handle interrupt immediately. 6. What is size of character, integer, integer pointer, character pointer? The size of character i...
6. Difference between object oriented and object based languages? Object oriented means everything is an object, they could have all the features of object such as inheritance, implementation of interface. But object based lang means it only uses object idea, it may not let you to create your own object. 7. Multiple inheritance - objects contain howmany multiply inherited ancestor? Java allows only one inheritance, but lang such as C++ allows multiple inheritance which means one class could inherit the behavior on many parent classes. 10.Is java a pure object oriented language? Why? Java is not pure OOL, it still maintains some primitives such as int, char 11. Order of constructor and destructor call in case of multiple inheritance The order of constructor is from base to current which means the constructor of the parent class will be called first, which is the opposite for destructor. ...
评论