Which TCP port number of the server the Web browser will connect to when specifying URL...
Accenture technical mcq question, verified with a worked answer. Free to practise - no sign-up.
Which TCP port number of the server the Web browser will connect to when specifying URL (Universal Resource Locator) as http://ftp.example.jp/index.cgi?port=123 in the Web browser?
Show answer & explanation
The URL uses the http:// protocol, which by default connects to TCP port 80. The query string parameter port=123 is application-level data sent to the server after connection, not a directive for which port to connect to. Port 21 is FTP, port 443 is HTTPS, and port 123 is NTP—none are used here.
Step-by-step Derivation:
Step 1: Parse the URL scheme — http://ftp.example.jp/index.cgi?port=123
Step 2: Identify the protocol — http (not https, not ftp)
Step 3: Recall default TCP port for HTTP — 80
Step 4: Note that the query string 'port=123' is application data, not a connection parameter
Step 5: Browser connects to port 80 by default for http://