void Function |
||||
42 views
To indicate that the function does not return a value, declare it with a return type of void.Also to declare that there is no arguments with function just write void in place of it. Syntax : —-void function-name( void ){ body}—— A simple function is, void print_message( void ) Note the function name is print_message. No arguments are accepted by the function, this is indicated by the keyword void in the accepted parameter section of the function declaration. The return_data_type is void, thus data is not returned by the function. Example : void squares() int loop; } |
| « CSS Margin | CSS Padding » |
| Posted on Saturday, June 14th, 2008 at 2:48 pm under C For Beginners | RSS 2.0 Feed | |