prototype of atoi function
Write a c Function which converts string to an integer?
#include %26lt;ctype.h%26gt;
int atoi(char *s)
{ int r=0;
while (isdigit(*s))
{ r = (10*r) + (int)(*s-'0');
s++;
}
return r;
}
bottle palm
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment