
Write a program that receives a single string argument and prints its first whitespace-delimited token, followed by a newline.
./lead_token "ship it before standup" | cat -eExpected result
ship$For your own tracking. Tests grade your code.
./lead_token " typescript ate my tabs" | cat -eExpected result
typescript$./lead_token " " | cat -eExpected result
$./lead_token "no-space" | cat -eExpected result
no-space$Expected files
lead_token.cAllowed functions
write
v0.40: Create exercises. Challenge the community.
Meet Studio →Write a program that receives a single string argument and prints its first whitespace-delimited token, followed by a newline.
./lead_token "ship it before standup" | cat -eExpected result
ship$For your own tracking. Tests grade your code.
./lead_token " typescript ate my tabs" | cat -eExpected result
typescript$./lead_token " " | cat -eExpected result
$./lead_token "no-space" | cat -eExpected result
no-space$Expected files
lead_token.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.