Results for “print”
Small, practical examples. Search by task or narrow things down below.
Format decimal output
Use fixed and setprecision to print two C++ decimal places.
C++✓ Tested
Format several integers in a fixed buffer
Arduino / C: snprintf limits writes to the buffer size and includes a terminating null byte.
Arduino / C✓ Tested
Identify whether a name resolves to a builtin
Bash Scripts: type -t reports the command kind without printing a machine-specific path.
Bash Scripts✓ Tested
List local branches
Print branch names in sorted order.
branch✓ Tested
Read recent commit messages
View a compact history in newest-first order.
log✓ Tested
Repeat a fixed number of times
Python: Use a counted loop to print three numbered steps.
Python✓ Tested
Repeat a fixed number of times
C#: Use a counted loop to print three numbered steps.
C#✓ Tested
Repeat a fixed number of times
Java: Use a counted loop to print three numbered steps.
Java✓ Tested
Repeat a fixed number of times
JavaScript: Use a counted loop to print three numbered steps.
JavaScript✓ Tested
Repeat a fixed number of times
TypeScript: Use a counted loop to print three numbered steps.
TypeScript✓ Tested
Repeat a fixed number of times
C++: Use a counted loop to print three numbered steps.
C++✓ Tested
Repeat a fixed number of times
C: Use a counted loop to print three numbered steps.
C✓ Tested