That depends on the configuration of the wifi point.
Wifi has different standards: 802.11/a ac b g n. These letters a, ac, b, g and n are its capability. If the wifi point is configured to not support one or more standards while the client only supports one of those, then the client will not be able to connect. If the wifi point is set to support all modes, then the client will connect.
In addition, the speed can be set to 20Mhz or both 20Mhz/40Mhz. It will use 40Mhz if available or fall back to 20Mhz otherwise. There is no 40Mhz only option.
So just because the network offers 40Mhz, doesn't mean it stops support for the 20Mhz also. It all matters what standards have been enabled. Some people configure their wifi points to only support n in order to ensure that a client that has multiple ways of connecting, always chooses the fastest method, sacrificing backwards compatibility. If this is the case for you too, then the client will not be able to connect. But most of the time, especially if the default settings were used, all protocols are enabled, and the client can connect just fine.