CJCoding With Joseph
15free / daySign inCreate account

Print a Shelf Label Taken by Const Reference

Fill in void printLabel(const string &text).

main is already written: it reads one whole line from input with getline and passes it to printLabel.

printLabel must print two lines - the label text, then how many characters the label contains (use text.length()).

For the input:

Warehouse Bin

the program must print exactly the output shown in Expected Output.

Do not put quotes around the text.

Expected Output:

Label: Warehouse Bin
Length: 13

= newline. The output ends with a newline — print one after the last line.

Hints2 available
Topics:
Pointers
📥 Auto-Input:
Warehouse Bin\n
This input is automatically fed to your program's stdin
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cout, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.