learn:programming_c
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| learn:programming_c [2026/04/28 02:17] – ↷ Page moved from basic:programming_c to learn:programming_c azman | learn:programming_c [2026/08/11 09:28] (current) – azman | ||
|---|---|---|---|
| Line 28: | Line 28: | ||
| Like other configuration files in Unix/Linux systems, writing a '' | Like other configuration files in Unix/Linux systems, writing a '' | ||
| + | |||
| + | //**Note**: This is based on GNU make utility. There are other variation(s) such as the BSD make.// | ||
| <file make makefile> | <file make makefile> | ||
| Line 88: | Line 90: | ||
| It is sometimes very useful to be able to provide information (@input) to the program at command line. This can be made possible by declaring 2 parameters: <code c param.c> | It is sometimes very useful to be able to provide information (@input) to the program at command line. This can be made possible by declaring 2 parameters: <code c param.c> | ||
| # | # | ||
| - | int main(int argc, char *argv[]) | + | int main(int argc, char *argv[]) { |
| - | { | + | |
| int loop; | int loop; | ||
| printf(" | printf(" | ||
| - | for(loop=0; | + | for (loop=0; |
| - | | + | |
| printf(" | printf(" | ||
| } | } | ||
| Line 110: | Line 110: | ||
| # | # | ||
| # | # | ||
| - | + | int main(int argc, char** argv) { | |
| - | int main(int argc, char** argv) | + | |
| - | { | + | |
| int loop; | int loop; | ||
| - | if (argc<2) | + | if (argc<2) { |
| - | { | + | |
| printf(" | printf(" | ||
| printf(" | printf(" | ||
| Line 125: | Line 122: | ||
| printf(" | printf(" | ||
| } | } | ||
| - | for (loop=1; | + | for (loop=1; |
| - | { | + | if (!strcasecmp(argv[loop]," |
| - | if (!strcasecmp(argv[loop]," | + | |
| - | { | + | |
| printf(" | printf(" | ||
| } | } | ||
| - | else if (!strcasecmp(argv[loop]," | + | else if (!strcasecmp(argv[loop]," |
| - | { | + | |
| printf(" | printf(" | ||
| } | } | ||
| - | else if (!strcasecmp(argv[loop]," | + | else if (!strcasecmp(argv[loop]," |
| - | { | + | |
| printf(" | printf(" | ||
| } | } | ||
| - | else if (!strcasecmp(argv[loop]," | + | else if (!strcasecmp(argv[loop]," |
| - | { | + | |
| printf(" | printf(" | ||
| } | } | ||
| - | else if (!strcasecmp(argv[loop]," | + | else if (!strcasecmp(argv[loop]," |
| - | { | + | |
| printf(" | printf(" | ||
| } | } | ||
| - | else if (!strcasecmp(argv[loop]," | + | else if (!strcasecmp(argv[loop]," |
| - | { | + | |
| printf(" | printf(" | ||
| } | } | ||
| - | else if (!strcasecmp(argv[loop]," | + | else if (!strcasecmp(argv[loop]," |
| - | { | + | |
| printf(" | printf(" | ||
| } | } | ||
| - | else if (!strcasecmp(argv[loop]," | + | else if (!strcasecmp(argv[loop]," |
| - | { | + | |
| printf(" | printf(" | ||
| } | } | ||
learn/programming_c.1777342661.txt.gz · Last modified: by azman
