All else being equal, the shorter the string, the higher the frequency.
When a string is plucked, it starts vibrating. The speed with which it vibrates, depends on the mass of the string (the higher the mass, the slower it will move), the tension (more tension, faster), and on the length of the string.
The longer the string the slower it will vibrate, because there is more string that vibrates.
The relation between string length and frequency is inversely proportional , which means that halving the string length will double the frequency, and vice versa. But this works for any ratio. The fundamental frequency can be calculates as:
##f = 1/(2L)sqrt(T/mu)##
Where ##L## is the length of the string, ##T## is the tension in the string, and ##mu## is the mass per unit length of the string. ( ##mu## = mass of string ##/## length of string)
That’s why almost every string instrument has a provision to ‘shorten’ the string (they are called ‘frets’ in guitars), so you can produce different tones from the same string.