I have come across a C syntax in which there is no return value for the functions and the arrays seem to be initialized strangely as well. Not how I've been taught to write C programs but it compiles fine, what is the reason for that?
A code example would be:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
char array[] = "abcdef""ghijkl""mnopqr";
func()
{
// insert some code here
}
main()
{
// insert some code here e.g. func();
}
Assignment of char arrays from string literals is supported by both C and C++.
Omitting the return type of a function is standard C and is not permissible in C++. (In C, if left
unspecified, the return type defaults to int).