What i did is I create a func atoi1 as i want in long long
so i wrote
unsigned long long atoi1(char s[])
unsigned long long m=0;
int i;
for(i=0;s[i]>='0' && s[i]<='9';++i)
return m;
in main i create an array which takes the no string from user
and with the help of this func it converts it into long long
again it is giving negative result on exceeding the value from 32767
ie 16 bit