All submissions

Constructor with Parameters

#include <iostream>
using namespace std;

class UART {
public:

    UART(int baudrate, char parity) {
        printf("UART initialized with baud=%d, parity=%c\n", baudrate, parity);
    }
};

int main() {
    UART u(9600, 'N');
    return 0;
}
Loading...

Input

Expected Output

UART initialized with baud=9600, parity=N