diff --git a/calc.c b/calc.c index 66408e2..93b7afc 100644 --- a/calc.c +++ b/calc.c @@ -11,7 +11,7 @@ int getop(char[]); void push(double); double pop(void); -int main() +int main() // main function// { int type; double op2; @@ -118,7 +118,7 @@ int getch(void) } -void ungetch(int c) +void ungetch(int c) // function// { if(bufp >= BUFSIZE) printf("ungetch: toomany characters\n"); diff --git a/digit_count.c b/digit_count.c index 813f7fa..4387bde 100644 --- a/digit_count.c +++ b/digit_count.c @@ -1,6 +1,6 @@ #include -main() +main() // main function starts// { int c, i, nwhite, nother; int ndigit[10]; @@ -9,7 +9,7 @@ main() for(i = 0; i < 10; i++) ndigit[i] = 0; - while ((c = getchar()) != EOF) + while ((c = getchar()) != EOF) // while loop starts// if(c >= '0' && c <= '9') ++ndigit[c-'0']; else if (c == ' ' || c == '\n' || c == '\t') @@ -20,5 +20,5 @@ main() printf("digits ="); for(i = 0; i < 10; ++i) printf(" %d", ndigit[i]); - printf(", whitespace = %d, other = %d\n", nwhite, nother); + printf(", whitespace = %d, other = %d\n", nwhite, nother); // printing result// }