Programmer interview questions shared by candidates
How to check if a number is divisible by 16 without using operator / or % ?
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.
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 ‘.’
See Interview Questions for Similar Jobs
- Software Engineer
- Junior Executive
- Junior Software Engineer
- Senior Analyst
- Software Developer
- Management Trainee
- Data Analyst
- Business Development
- Product Engineer
- Business Development Executive
- Business Analyst
- Senior Software Engineer
- Programmer Analyst