Programmer Interview Questions | Glassdoor.co.in

Programmer Interview Questions

3,712

Programmer interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

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

8 Answers

should do using bit-wise operators

I will run a loop that'll subtract 16 from the number. If result is zero than it is divisible else if it goes less than zero than its is not.

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

Use 10 trees and plant them in 4 rows such that each row has atleast 4 trees

7 Answers

How to print "hello world" by using following if else block: if(write any condition you want) printf("World"); else printf("Hello"); I answered them that we can use goto statement, but he expected other answer that i didn't know at that time.

5 Answers

What is java?

5 Answers

How to find that a given number is even or odd without using (if, else, any loop, conditional operator ,switch). You can use only a "%" sign.

4 Answers

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

4 Answers

whats is the difference between merge and join .

4 Answers

write a sql query to swap the genders i.e. from male to female and vice versa ?

4 Answers

It was easy... consist of puzzles & case studies.

4 Answers

The programs that i encountered: 1.Get the average marks from user and if avg>=80&&avg>=100 print grade A. avg>=60&&avg<=79 print grade B,else grade C. 2.write a program for the series 1,2,2,4,8,32. 3.write a function that accepts int array as parameter and print the sorted array. 4.draw a flow chart for the question 1. 5.write a function that accept string as a parameter and prints the number of vowels . 6.write an abstract class and performs the string length and reverse string operation. 7.write a class program with default and parameterized constructor and perform constructor overloading operation. 8.write a program for string validation. • Should not start with ‘.’ And should end with ‘.’ • The string must contain at least 3 spaces. • Size of the string not more than 20. 9.write a program for email validation • There is only one @ symbol • ‘.’ should come after the @ symbol • Should not start with ‘.’

4 Answers
110 of 3,712 Interview Questions