Tutorials, Free Online Tutorials,It Challengers provides tutorials and interview questions of all technology like java tutorial, android, java frameworks, javascript, core java, sql, php, c language etc. for beginners and professionals.

Breaking

7. Multiple a number by 7 without using * and + operator.


7. Multiple a number by 7 without using * and + operator.

      NewNum = Num << 3;                // mulitplied by 2 ^ 3 = 8

      NewNum = NewNum - Num;     // 8 – 1 = 7

No comments:

Post a Comment