# 719

Junior Programmer interview questions shared by candidates

## Top Interview Questions

Sort: Relevance|Popular|Date
Junior Programmer was asked...July 14, 2017

### How to check if a number is divisible by 16 without using operator / or % ?

Bit wise right shift four times, if integer then divisible.

If a number is divisible by 2^n, do bitwise right shift n times and then bitwise left shift n times to get back the same number. Less

should do using bit-wise operators

### How to check if a number is even or odd without using % or / ?

perform bitwise AND of given number with 1 and check the last bit if it is zero then number is even and if it is 1 then number is odd Less

int num; cout &gt; num; if ((1 &amp; num) == 1) { cout &lt;&lt; "Odd \n"; } else { cout &lt;&lt; "Even \n"; } Less

How if we subtract 2 from given number while x&gt;0. set flag=1 in while loop if x==0 found and break the while loop. Like this : int main() { int x,flag=0; cin&gt;&gt;x; do { x=x-2; if(x==0) { flag=1; break; } }while(x&gt;0); if(flag==1) { cout&lt;&lt;"Even"; } else {cout&lt;&lt;"ODD";} return 0; } Less

### Sabes que es c++?

Si, lo sé

Es un lenguaje de programación .

Sí, lo sé. Es un lenguaje de programación.

### Do you have any children?

This question cannot be asked by an HR person. Illegal

No I don't have any yet. I'd like to get married first.

It is illegal, but they ask questions like that all the time. You can just answer it if you think it won't be used against you. But I prefer, "That's an interesting question, why do you ask?" Less

### 1. reverse a string eg. " the ram " to "mar eht" 2. one pattern questions eg. pyramid

static void reverseString(String arr[],int start , int end) { String temp ; while (start Less

1. method 1: public class WithoutFunct { public static void main(String[] args) { String in="hi my name"; for(int i=in.length()-1;i&gt;=0;i--) { System.out.print(in.charAt(i)); } } } Less

### cuanto tiempo de experiencia en java

repondi en base a mi conocimiento y trayecto por 2 años

Pouco conhecimento em JAVA, pois meu CONHECIMENTO PRINCIPAL é baseado em Sistemas de MainFrames(ZO/S), Suporte à Produção. Less

### Foi bem básico, somente perguntas sobre as skills esperadas para a ocupação da vaga.

Relatei minhas experiências anteriores e também sobre tecnologias que estava estudando mas não tinha experiência profissional com elas. Less

### what is jfc?

java foundation class