Why is the variable "char *s" declared in between the function name and curly braces? What is the significance of it?
main(m1,s) char *s; {
/*
some code here
*/
}
Why is the variable "char *s" declared in between the function name and curly braces? What is the significance of it?
main(m1,s) char *s; {
/*
some code here
*/
}
This is old K&R C syntax (pre-dates ANSI/ISO C). Nowadays, you should not use it anymore (as you have already noticed its major disadvantage: the compiler won't check the types of arguments for you).
main(m1,s) char *s; {
/*
some code here
*/
}
in this code compiler did not check data type of m1 and s.