
Given a square chess board passed as a single argument, decide whether the King is currently under attack by any other piece.
./chess_check $'B....\n.....\n..K..\n.....\n.....'Expected result
SuccessFor your own tracking. Tests grade your code.
./chess_check $'.....\n.....\n..K..\n.....\n.....'Expected result
FailExpected files
chess_check.cAllowed functions
write
v0.40: Create exercises. Challenge the community.
Meet Studio →Given a square chess board passed as a single argument, decide whether the King is currently under attack by any other piece.
./chess_check $'B....\n.....\n..K..\n.....\n.....'Expected result
SuccessFor your own tracking. Tests grade your code.
./chess_check $'.....\n.....\n..K..\n.....\n.....'Expected result
FailExpected files
chess_check.cAllowed functions
write
Run the tests to grade your code
Build your code, then check each test here. Open a result to inspect its output.