Wednesday, 25 January 2017

level 1 : 13 Step by step interview question to crack the interview.

1. write a logic for below method  to calculate total salary of three month, also specify the correct type so that we can call it directly in main method with the help of call name ?
-----------------------------------------------------------
totalSalary(int firstMonth,int secondMonth, int thirdMonth)
-----------------------------------------------------------

2. write a method of callkr class in which we can get a required output for client  if we pass int in a method
-----------------------------------------------------------
method(int x)
o/p : x^x         ex : 2^2=4
-----------------------------------------------------------
3. write a method to get output as below
---------------------------------------------
method(int x)

o/p :  number you entered in prime
---------------------------------------------

4. write a method to get output as below
---------------------------------------------
method(int x)

o/p : xxx     ex : if we pass 5 to this method we should get 55555
---------------------------------------------
5. write a method to get output as below
---------------------------------------------
method(int x)

o/p : xxx     ex : if we pass 3 to this method we should get 303
---------------------------------------------

6. write a method to get output as below
---------------------------------------------
to performed BODMAS operation of math
---------------------------------------------
7. what is size of reference variable ?
8. what will we get if we will print reference variable ?
9. what will be the output of the below code ?



1 comment: