
What's the right declaration for main()? Is void main() correct? in C language ?
please help me sir !
Thank You !

Hi Srinivasan
If your main class is returning interger you will put int in front of main() class as follows : int main() But if your code is not returning anything you need to put void in front of main() as given in below code :
#include "stdio.h"
void main(){
int i;
static int count;
for(i=NULL;i<=5;){
count++;
i+=2;
}
printf("%d",count);
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.