find more than one extension file in linux

C++
find . -name "*.jpg"  
find . -type f -name "*.txt" -u -name "*.txt"
Source

Also in C++: