c=std::tolower(static_cast<unsignedchar>(c)); } intmain() { // 1. for_each + unary function std::stringstr="CONVERT"; std::for_each(str.begin(),str.end(),to_lowercase); std::cout<<str<<std::endl; // 2. for_each + object of a class implementing ()operator ...
( string [] args ) { string hexvalue = "7f" ; int intvalue = 0 ; intvalue = hex2int ( hexvalue ); system . out . printf ( "value is: %d\n" , intvalue ); } } output value is: 127 explanation in the above program, we imported the " java.util.scanner " package to read...