/** divide.c - A sample source that illustrates an intent error ***** ************* resulting from the characteristics of ***************** *********************** integer division ***************************/ #include #include int divide(int x, int y) { /*Returns to the main function the result of the division of two integers.*/ return (x/y); } /*Prototype main function*/ int main(int argc, char *argv[]) { int i= atoi(argv[1]); /*Conversion of the first command line argument to an integer.*/ int b= atoi(argv[2]); /*Conversion of the second command line argument to an integer.*/ /*Output to the standard output device the result of the call to the function "divide".*/ printf("%d \n",divide(i,b)); /*Return to O.S.*/ return 0; }