Submarines haven't used naval guns (a "gun" in naval terminology is a cannon) since WWII. The reason for this is that in those days, submarines weren't true submersibles - they were considered surface vessels that had a limited submerged operational capability. Although they could attack on the surface or submerged, they primarily transited on the surface until they made contact with a surface vessel.
With the advent of Nuclear Power, submarine design became more streamlined, and any exterior armament was considered unnecessary for several reasons:
1. Increased acoustic signature output (more noisy underway)
2. Speed hindrance
3. Advent of modern weapons made surface engagements unlikely
4. Submarines traveled and attacked exclusively underwater, hence no need for a surface engagement
5. Nuclear Submarines don't deal with small targets - supersonic aircraft capability means that a aircraft can be vectored to the target if absolutely necessary, but in virtually all cases, the mission is about ships and submarines, not small fry.
WWII era boats typically had either a forward mounted 40mm or 20mm deck gun, used to engage surface targets if forced to the surface, or to sink smaller craft that wouldn't require a torpedo.
Onboard weapons are treated like a gun in a procedural and terminology sense though, e.g., loading, safeties, etc. It's a Hollywood misconception that the word "fire" is used to command a weapon release - "fire" means only one thing aboard a submarine, and it ain't a torpedo or missile launch. When a target solution is reached, the command "Shoot" is given for a weapon release.
machine guns, submarines and poisen gas
Poison GasAirplanes Submarines Tanks Automatic machine guns
Yes, before cruise missiles came about, submarines were armed solely with torpedoes and, more common in WW2, deck guns.
The major weapons were machine guns, artillery guns, poison gas, tanks, zepplins and submarines.
machine guns tanks poison gas submarines airplanes
Ironclad ships, landmines, submarines, observation balloons, repeating guns, and grenades.
Spears, arrows, guns, flintlock, tanks, submarines, flame throwers to name a few.
barbed wire, flamethrower, mounted machine guns, tanks, submarines, hand grenades, gases and airplanes.
1. Poison Gas 2. Tanks 3. Submarines 4. Machine Guns
Rifles, mortars, artillery,machine guns, tanks,airplanes, warships of many types, submarines, airships and dangerousgases.
Yes and the repeater rifle was invented. Lincoln bought several hundred for the Union army. Cannon, flamethrowers, submarines, were also developed.
WWI: Rifles, machine guns, submachine guns, pistols, machine pistols, revolvers, grenades, bombs, mines, flamethrowers, bayonets, swords, knives, spears, axes, clubs, crossbows, tanks, airplanes, zeppelins, gas, boats, ships, submarines... WWII: Rifles, assault rifles, machine guns, submachine guns, pistols, machine pistols, revolvers, grenades, bombs, mines, missiles, nuclear bombs, flamethrowers, bayonets, swords, knives, tanks, airplanes, boats, ships, submarines... So pretty much everything at hand. That's war.