how to add comments in terminal ubuntu

C++
#!/bin/bash
# By adding hash(#) before line it will takes it as comment.
Source

Also in C++: