Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Implement a program to convert a binary number to decimal.

Medium

Problem Statement

Implement a program to convert a binary number to decimal.

Sample Input

int binary = 1011;

Sample Output

Decimal = 11

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
#include <iostream> int main() { int binary = 1011; // Logic to convert binary to decimal return 0; }
Log in or sign up to run or submit your code.Log inSign up
Input
int binary = 1011;
Expected Output
Decimal = 11