human
Toggle all odd bits of a number | Returns a number which has all odd bits of n toggled ..
Generate number form of 101010. . . . . till of same order as n.
If bit is odd , then generate number and or with res.
Return toggled number.
Driver code"
Solution in Python:
 ... Give me a code to toggle all odd bits of a number and the other steps required?
assistant
#Here is code to toggle all odd bits of a number and the other steps required.
 def evenbittogglenumber ( n ) :
	res = 0 ; count = 0 ; temp = n
	while ( temp > 0 ) :
		if ( count % 2 == 0 ) :
			res = res | ( 1 << count )
		count = count + 1
		temp >>= 1
	return n ^ res
if __name__ == ' _ _ main _ _ ' :
	n = 11
	print ( evenbittogglenumber ( n ) )