abs in std c++ time complexity code example Example: abs in cpp int a =4; int b =5; int ans = abs(a-b); //ALWAYS RETURN POSITIVE NUMBER.