# 6.1.22 VARCHAR

Part of: [6 Language](6-language.md) › [6.1 Data Types](6-1-data-types.md)

The HDFql VARCHAR data type stores values between 0 and 255 and occupies _size_ \* 1 byte in memory (where _size_ is the length of the string). It represents the data type of an HDF5 (variable-length) H5T_C_S1 dataset/attribute or of a result set that stores variable-length elements of this type (which can be retrieved using the [HDFQL_CURSOR_GET_CHAR](5-2-50-hdfql-cursor-get-char.md) function when working with cursors). The VARCHAR data type is useful for storing variable-length strings. Depending on the programming language supported by HDFql, the VARCHAR data type is represented by:

- In C, the “unsigned char \*” data type.
- In C++, the “unsigned char \*” data type.
- In Java, the “String” class.
- In Python, the “S_size_” NumPy data type.
- In C#, the “String” data type (or corresponding alias “string”).
- In Fortran, the “CHARACTER(LEN = _\*_)” data type.
- In R, the “character” data type.
- In MATLAB, the cell data type containing character vectors (e.g. “{‘France’, ‘Portugal’, ‘Switzerland’}”).
