function return with thread

0
CPP
cpp
OUTPUT