In real life, you will find it is very easy to tell which transport protocol is used. Also, if you are looking for a "rule of thumb", then think of this:
UDPUDP is a 'connectionless' / unreliable protocol, it does not recover lost packets like TCP does, and has much less overhead than TCP, so it is used as transport for applications that are sensitive to delay (like streaming audio / video).
TCPTCP is a 'connection oriented' / reliable protocol, it recovers packets when they are lost, and has higher overhead, but is used where packet loss would cause issues.
Here are a number of methods you can use to determine in real life what transport layer protocol an application is using:
-Run 'netstat -an' from a Windows command prompt.
-Download and run TCPView (which also lists UDP) for a GUI view.
-Run Wireshark
-Run nmap against the server with port in question (by default only scans TCP ports)