answersLogoWhite

0

it is always not necessary to write "void main " in C Programming.it depends on the source code we use if we have to return a value then void is not necessary because void returns the null.While coding in borland C++ we need to write void main but we dont need it in dav c++.

In C (and C++) the standard allows int main (void) and int main (int argc, char **argv)

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

Write a c program to have followiing as output?

void main() { printf("followiing"); }


Why do you write void to the first of main in c?

This is really unclear. If you're asking why you should write void main() then the answer is that you shouldn't. main can return an int as an error code, so it's better to do int main() instead.


How many essential functions are required to write a c program and write those?

One.int main (void) { return 0; }


Write a c program for alphabetical order?

int main (void) { puts ("ABCDEFGHIJKLMNOPQRSTUVWXYZ"); return 0; }


Write your name and address in c?

int main (void) { puts ("Your name and address"); return 0; }


Can you write a program with C?

#include <stdio.h> int main (void) { puts ("Yes, I can"); return 0; }


Write a program to check a C?

int main (void) { if ('C' == 'C') puts ("Okay"); else puts ('Oh, gosh"); return 0; }


Write c program to print?

include <stdio.h> int main (void) { puts ("print"); return 0; }


Write a c program to demonistrate?

#include <stdio.h> int main (void) { puts ("demonistrate"); return 0; }


Write a programme in c to print abcdefedcba?

#include <stdio.h> int main (void) { puts ("abcdefedcba"); return 0; }


How can you write a c programming which say you that day is holyday?

int main (void) {puts ("day is holyday");return 0;}


Is it compulsory to write static with void main?

Every C# application is started on the startup class' static Main method. Yes, it must be static, but void is not the only returned type. The 4 signatures:static void Main();static void Main(string[] arguments);static int Main();static int Main(string[] arguments);Ideally, there should be one and only one Main method in your application.