C++ Program to convert a decimal number into binary with constructor and destructor

By Prof. Fazal Rehman Shamil

Write a program in C++ to convert a decimal number into binary without using an array and using the constructor and destructor.

Decimal to binary C++

Constructor

Output

Please enter Decimal number: 8

binary number = 1000

Destructor

Output

Please enter Decimal number: 4

binary number = 100

Prof.Fazal Rehman Shamil (Available for Professional Discussions)
1. Message on Facebook page for discussions,
2. Video lectures on Youtube
3. Email is only for Advertisement/business enquiries.

Leave a Reply

Your email address will not be published. Required fields are marked *