Hi All I am trying multipy function.After compliering, the a value is 0x78H, b is 0x02H. So, if I want addition function d=a+b(0x78+0x02H)to next line, how define variable a,b to get through with my request. void main(void) { while(1){ char a,b,c,d; a=0x9e; b=0x04; c=a*b; //a=0x78 b=0x02 d=a+b; //this line is 0x9e+0x04 } }
What is your problem here? What are you actually trying to achieve? Why can't you just write
d = a + b*(0x78+0x02)