c programming

main( )
{
void slogan( ) ;
int c = 5 ;
c = slogan( ) ;
printf ( “\n%d”, c ) ;
}
void slogan( )
{
printf ( “\nOnly He men use C!” ) ;
}
//can you explain me the reason for the error…

error
c is declared as a integer variable and so a function cannot be assigned to it.

Function slogan doesn’t have an int return type

check this program…same as above … i just removed void slogan() statment …the very first line in main functon…now check the output…
main( )
{

int c = 5 ;
c = slogan( ) ;
printf ( “\n%d”, c ) ;
}
void slogan( )
{
printf ( “\nOnly He men use C!” ) ;
}

check this program…same as above … i just removed void slogan() statment …the very first line in main functon…now check the output… main( ) {

int c = 5 ; c = slogan( ) ; printf ( “\n%d”, c ) ; } void slogan( ) { printf ( “\nOnly He men use C!” ) ; }

check this program…same as above … i just removed void slogan() statment …the very first line in main functon…now check the output… main( ) {

int c = 5 ; c = slogan( ) ; printf ( “\n%d”, c ) ; } void slogan( ) { printf ( “\nOnly He men use C!” ) ; }