Hey guys i want to pick up a string from cmd . I am using C language and IDE as codeblocks.
Basically i want to firstly ping an ip address and this i will be doing by simply writing "system("ping <ip address>")" . Then on console i will get the output of the command ping <ip address> , that may be "request timed out" or "reply form ip " or something like that . I just want to take that string in my C program . I have basic knowledge of C. Any idea how to do this ???

Thanks in Advance ...
Sanchit ...

Try looking up a function like popen.

Okey thanks fr this i vl check n re-reply to this as soon as my exam get over in a week .. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.