Qualcomm | Written | Multiplication of 32 Bit integers
Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2022-03-26Added By Anonymous
Source: Link
Company: Qualcomm
Role: unknown
Interview Stage: Written
Location: unknown
Year: unknown
Write a C function which receives two signed integers and computes the multiplication of those integers. The first two arguments say p and q represents the multiplicand and multiplier, respectively. Though p and q are unsigned parameters in the function prototype, they are bit representation of signed integers. The function shall store the result of (p * q) in the memory locations pointed to by pqh and pql. Since the multiplication of two signed 32-bit integers produces a 64-bit result, the high-order 32 bits should be saved in the memory location pointed to by pqh and the low-order 32bits in the memory location designated by pql.
Role: unknown
Interview Stage: Written
Location: unknown
Year: unknown
Write a C function which receives two signed integers and computes the multiplication of those integers. The first two arguments say p and q represents the multiplicand and multiplier, respectively. Though p and q are unsigned parameters in the function prototype, they are bit representation of signed integers. The function shall store the result of (p * q) in the memory locations pointed to by pqh and pql. Since the multiplication of two signed 32-bit integers produces a 64-bit result, the high-order 32 bits should be saved in the memory location pointed to by pqh and the low-order 32bits in the memory location designated by pql.