Code:
# include<stdio.h>
main()
{
printf("Linuxquestions.org\n");
}
You do, realize that all functions in C or C++ has to return a value, unless it's declared as
void. main() is not an exception.
Code:
# include<stdio.h>
main()
{
printf("Linuxquestions.org\n");
return 0;
}
By default, all functions without explicit declaration, will be understood for the compiler as integer. You could declare it as void:
Code:
# include<stdio.h>
void main()
{
printf("Linuxquestions.org\n");
}
and then you don't need to return any value. It's a good programing style to always declare a function explicitly.
Code:
# include<stdio.h>
int main()
{
printf("Linuxquestions.org\n");
return 0;
}
Regards!