+ 1
Please show me the syntax for making an array of characters using "char mychar[]"
3 Answers
+ 5
char mychar[] = {'0', '1' , '2' , '3' };
0
I have a question, why we do not give the array it's size in the square brackets? cause if we are assigning values to it then we know it's size @K2 Shape and @Vladislav
- 2
char mychar[] = "example";
This code creates an array with length = 8(length of the word and null symbol '\n')