Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions calc.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ int getop(char[]);
void push(double);
double pop(void);

int main()
int main() // main function//
{
int type;
double op2;
Expand Down Expand Up @@ -118,7 +118,7 @@ int getch(void)
}


void ungetch(int c)
void ungetch(int c) // function//
{
if(bufp >= BUFSIZE)
printf("ungetch: toomany characters\n");
Expand Down
6 changes: 3 additions & 3 deletions digit_count.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <stdio.h>

main()
main() // main function starts//
{
int c, i, nwhite, nother;
int ndigit[10];
Expand All @@ -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')
Expand All @@ -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//
}