| Snaprecruit.com

| Snaprecruit.com

Interview question based on skill :

Take as many assements as you can to improve your validate your skill rating

Total Questions: 20

1. What are automatic variables?

Correct Answer is : Local variables

2. The memory for automatic variables ___________________

Correct Answer is : Are allocated and deallocated automatically

3. Scope of an automatic variable _______________

Correct Answer is : Is actually function or block in which it is defined

4. Which among the following is true for automatic variables in general?

Correct Answer is : Automatic variables are invisible to called function

5. If an automatic variable is created and then a function is called then ________________

Correct Answer is : The automatic variable doesn’t get destroyed

6. Where are the automatic variables stored if another function is called in between the execution of program?

Correct Answer is : Stack

7. The static variables of a function ________________

Correct Answer is : Are not automatic variables

8. All variables declared within a block ____________________

Correct Answer is : Are automatic by default

9. What values does uninitialized automatic variables contain?

Correct Answer is : Undefined/Garbage

10. Constructor of automatic variables is called ____________________

Correct Answer is : When execution reaches the place of declaration of automatic variables

11. Does java contain auto or register keywords?

Correct Answer is : No, java supports local variable concept

12. The automatic variables _________________________

Correct Answer is : Must be declared before using

13. Which error is produced if the automatic variables are used without declaration?

Correct Answer is : Undefined symbol

14. In perl, using which operator are the local variables created?

Correct Answer is : my

15. How are automatic variables different from the instance variables?

Correct Answer is : Instance variables are initialized implicitly while automatic are not

16. Which is most appropriate definition of a base class?

Correct Answer is : It is parent of any of its derived class

17. A base class is also known as _____________ class.

Correct Answer is : Super

18. An abstract class is always a __________ class.

Correct Answer is : Base

19. How many base classes can a single class inherit in java?

Correct Answer is : 1

20. How to make a derived class a base class?

Correct Answer is : Make a class derive from it