Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Functions

C programs are built from functions. Each function takes a number of arguments and can optionally return an answer. There is no concept of objects as used in Java. The function called to start a program is called main(). main() takes as argument an array of strings specifying the command-line arguments used to start the program. For instance, if you type man strlen, man’s main function will see numberOfArguments as 2 and arguments as {"man", "strlen"}:

void main(int numberOfArguments, char* arguments[])
{
  // Code ...
}


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial