aboutsummaryrefslogtreecommitdiff
path: root/3.4.c
diff options
context:
space:
mode:
authorsinanmohd <pcmsinan@gmail.com>2022-06-04 18:57:14 +0530
committersinanmohd <pcmsinan@gmail.com>2022-06-04 18:57:14 +0530
commitef4f5e3614fc9afbf4dd15c44d59d9535f43b290 (patch)
treed5f6d95c5ce2f9050a965175d887074a73e007ff /3.4.c
parent33f3e3f2bdd7e4eaf89e9708505d3c0d27fc23f7 (diff)
add 3.5
Diffstat (limited to '3.4.c')
-rw-r--r--3.4.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/3.4.c b/3.4.c
index d4a1c9a..5c75d03 100644
--- a/3.4.c
+++ b/3.4.c
@@ -38,7 +38,7 @@ itoa(int n, char str[])
{
int sign, i;
- /* to include the most -ve int*/
+ /* to include the most -ve int */
n = ((sign = n) < 0) ? -(n+1) : n-1;
i = 0;
@@ -49,6 +49,7 @@ itoa(int n, char str[])
if (sign <0)
str[i++] = '-';
+ /* part of "to include the most -ve int" */
str[0] += 1;
str[i] = '\0';