Salem's Avatar, Join Date: Nov 2007
Ambitious contributor
I could, but I'm not interested in reading code which has been posted without using code tags.
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
arvind_khadri, Learn to post code in the posts with the code block
arvind_khadri's Avatar, Join Date: Sep 2007
Go4Expert Member
shabbir thanks for the code block....
now its in code pls help me....
Salem's Avatar, Join Date: Nov 2007
Ambitious contributor
Sure, there are lots of things wrong with it.

> void main()

> #include<conio.h>
This is a non-standard header file, so you should avoid using unless necessary.
It is also obsolete as well, as no new compiler will ever have such a thing. Even compilers like dev-c++ which do include it do only for backward compatibility.

> union ipadd
A union with only one member is kinda pointless, so it looks just like a struct.

> d=d+(*(p+i)-48)*pow(10,po);
You know, this is exactly what strtol() does, so why not use it?
In fact using strtol() means you can avoid the messy strtok() function as well, which as a side-effect trashes the input string.