Q: What is the size of a given char? I've got a code that i cannot understand in C;
char c is string, that supposed to be randomized,
here is the question however, 26 is supposed to be range of values starting from 97, but it easy to understand for integer, but in case of char i have no clue what it is supposed to be
char c = (char) rand() % 26 + 97;


A: That is generating a random character. In ASCII, alphabetical characters start at 97. So, the code is taking 97, adding a random number between 0 and 25 to it, then casting it to a char, which generates a random alphabetical character.

A: 97 = ascii 'a'
It generates a random character between 'a' and 'z' inclusive.
Ref: ASCII values

A: It's a bad, non-portable way to generate a random character by directly computing the ASCII code.
A better, more portable, way is to randomize the index into a table of characters. This pushes the responsibility for what code is used to represent each character into the compiler, where it belongs:
char random_char(void)
{
  const char alpha[] = "abcdefghijklmnopqrstuvwxyz";

  return alpha[rand() % sizeof alpha];
}

Any decent compiler will very likely inline the above.
NOTE Using % to range-limit the return value of rand() is generally frowned upon, but that's not the focus here.
