bcd to char c

Solutions on MaxInterview for bcd to char c by the best coders in the world

showing results for - "bcd to char c"
Jebediah
18 Jan 2017
1void BCD_To_ASCII(unsigned char bcd_value, char * p_ascii_text)
2{
3  //--------------------------------------------------
4  // BCD contains digits 0 .. 9 in the binary nibbles
5  //--------------------------------------------------
6  *p_ascii_text++ = (bcd_value >> 4)  + '0';
7  *p_ascii_text++ = (bcd_value & 0x0f) + '0';
8  *p_ascii_text = '\0';
9  return;
10}
11
Zebulon
11 Aug 2017
1              class Person{      private: int Code;  char Name[25];
2                                         public: Person ( int Code=23, char *Name =”Unknow”);     
3                                                     char *GetName( ); void SetName(char *Name);
4                                         protected: void Input( ); void Output( );
5                               }; 
6           class Employee: protected Person{                    
7                        protected: int hour; float Salary; static float Rate;
8                         public: void Indata( ); void Outdata( );
9                                                        };
10
11  class Company: public Employee{                         
12           public:  inline float Income( );
13                      friend void Sort(Company a[45],int n); // by Name
14                      friend void Del_Employee(Company obj[45],int n); // by Salary                      
15                               };
16