Is it mandatory to give '\0' for initialization of character arrays?
No, not in general.
Yet if code needs the initialized character array to be considered a string, then a null character is needed somehow: explicitly or implicitly.
char name[10] = {'L','e','s','s','o','n','s'};
My question : Is \0 added automatically in the above case?
Yes. There are no partial initializations. 7 of the 10 elements are explicitly initialized. If code only explicitly partially initializes an object, "all subobjects that are not initialized explicitly shall be initialized implicitly the same as objects that have static storage duration." C17dr § 6.7.9 19
"If an object that has static or thread storage duration is not initialized explicitly, then:
— if it has pointer type, it is initialized to a null pointer;
— if it has arithmetic type, it is initialized to (positive or unsigned) zero;
— if it is an aggregate, every member is initialized (recursively) according to these rules, and any padding is initialized to zero bits;
— if it is a union, the first named member is initialized (recursively) according to these rules, and any padding is initialized to zero bits; C17dr § 6.7.9 10
EDIT: What happens in this cases :
char name[7] = {'L','e','s','s','o','n','s'};
char name[8] = {'L','e','s','s','o','n','s'};
name[7] is as coded. No null character exist in name[] so the character array is not a string.
name[8] is as if {'L','e','s','s','o','n','s', 0} was coded. Since it contains a null character, name[] is also a string.
The below all initial nameX[] to the same value:
char name1[10] = {'L', 'e', 's', 's', 'o', 'n', 's'};
char name2[10] = {'L', 'e', 's', 's', 'o', 'n', 's', 0};
char name3[10] = {'L', 'e', 's', 's', 'o', 'n', 's', '\0'};
char name4[10] = {'L', 'e', 's', 's', 'o', 'n', 's', 0, 0, 0};
char name5[10] = {[0] = 'L', [1] = 'e', [2] = 's', [3] = 's', [4] = 'o', [5] = 'n', [6] = 's'};
char name6[10] = {[1] = 'e', [2] = 's', [3] = 's', [4] = 'o', [5] = 'n', [6] = 's', [0] = 'L'};
char name7[10] = {[1] = 'e', [3] = 's', [2] = name7[3], [4] = 'o', [5] = 'n', [6] = 's', [0] = 'L'};
char name8[10] = "Lessons";
char name9[10] = "Lessons\0";