Compile-Time Constant Check

#include <iostream>
using namespace std;

// write your logic here
constexpr int a = 12; 

int main() {
    static_assert(a == 12, "Failed");
    cout << "passed";
    return 0;
}

Solving Approach

 

 

 

 

Upvote
Downvote
Loading...

Input

Expected Output

passed