Increment a number without using ++ or + | C # program to increment an unsigned int using bitwise operators . ; function that increment the value . ; Invert bits and apply negative sign ; Driver code
using System ; class GFG { static long increment ( long i ) { i = - ( ~ i ) ; return i ; } public static void Main ( ) { long n = 3 ; Console . WriteLine ( increment ( n ) ) ; } }