fork download
  1. #include <stdio.h>
  2.  
  3. // Void function definition
  4. void hello() {
  5. printf("GeeksforGeeks\n");
  6. }
  7.  
  8. // Return-type function definition
  9. int square(int x) {
  10. return x * x;
  11. }
  12.  
  13. int main() {
  14. int x;
  15.  
  16. // Calling the void function
  17. hello();
  18.  
  19. // Calling the return-type function
  20. int result = square(25);
  21. printf("Square of %d is: %d",x, result);
  22.  
  23. return 0;
  24. }
Success #stdin #stdout 0s 5284KB
stdin
9
stdout
GeeksforGeeks
Square of 0 is: 625