human
Set all odd bits of a number | set all odd bit.
res for store 010101. . number.
generate number form of 010101. . ... till temp size.
if bit is odd , then generate number and or with res.
Driver code"
Solution in Python:

Write me a code to set all odd bits of a number and the other steps required?
assistant
#Here is code to set all odd bits of a number and the other steps required.
 def oddbitsetnumber ( n ) :
	count = 0
	res = 0
	temp = n
	while temp > 0 :
		if count % 2 == 0 :
			res |= ( 1 << count )
		count += 1
		temp >>= 1
	return ( n res )
n = 10
print ( oddbitsetnumber ( n ) )