Qualcomm Interview Question

Function to convert a integer to a binary string

Interview Answers

Anonymous

Jun 5, 2013

I ll simply put the pseudo code : //binary_num will contain the string //dec_num already contains the number k=0; do { binary_num[k]=dec_num%2; dec_num/=2; k++; }while(dec_num>1);

Anonymous

Jun 5, 2013

I ll simply put the pseudo code : //binary_num will contain the string //dec_num already contains the number k=0; do { binary_num[k]=dec_num%2; dec_num/=2; k++; }while(dec_num>0);