Search A2Z 24

Some Concept's Keep In you Mind( C C++ and Java)

The main() Function in C/C++

The main function in a C++ program can have either of the following signatures:

return-type main()
return-type main(int argc, char *argv[])

The return-type can be any valid type or void indicating that the function does not return any value. The argument list can be empty, or can contain the arguments shown to support the use of command-line arguments.

The argument int argc is used by the operating system to pass an integer value specifying the number of command-line arguments entered by the user.

The argument char *argv[] passes a pointer to an array of pointers of type char.
Each of the pointers in the array points to a null-terminated string in memory, which is an argument, entered at the command line.
The pointer with an index of 0 points to a string containing the name of the program (or garbage with some systems).
The pointer with an index of 1 points to the first true command-line argument.

The names of the arguments shown are traditional, but not required.

Java Coding standerd follow by the sun:(Noman cleture)

Package name, it should be in Lower case.

Class nameInterface name should have first latter in upper case and every word start with Upper case latter.

Variable name & Method name should begin with Lower case but after first latter of every word is Upper case.

Class constant is in Upper case.

When passing variable in a method then variable name should start with a "a".

About Author

by Admin