Unsigned Multiplication using Signed Multiplier
问题 I have been assigned with a task to perform unsigned multiplication using signed multiplier. Despite multiple attempts, I couldn't get it. Is it possible to do this? Code: #include <stdio.h> int main() { // Must be short int short int a=0x7fff; short int b=0xc000; unsigned int res1; signed int res2; //unsigned multiplier res1= (unsigned short int) a * (unsigned short int) b; //signed multiplier res2= (short int) a * (short int) b; printf("res1: 0x%x %d \n res2: 0x%x %d\n",res1,res1,res2,res2)