0

I was looking at this simple line of code on github and noticed it ran the exact same after I took out void. Why would void even be used in this situation?

#include <stdio.h>

/*
 * @author jelathro
 * @date 2/18/13
 * 
 * Print "Hello, World!" to the console
 */
int main(void){
    printf("Hello, World!\n");
    return 0;
}
Jabberwocky
  • 48,281
  • 17
  • 65
  • 115
  • 1
    Related: https://stackoverflow.com/questions/41803937/func-vs-funcvoid-in-c99 https://stackoverflow.com/questions/693788/is-it-better-to-use-c-void-arguments-void-foovoid-or-not-void-foo – SuperStormer Sep 21 '22 at 02:35

0 Answers0