I have a string of the form "abcd\"1234\"efgh". I want to extract 1234 from this string. How should I do this?

Show your efforts. This is not the place for getting your home-work done.

And read the basic books for programming in C before you start coding!

There are many ways to solve a single problem. You've to choose which one you think is right for your application.

I have a string of the form "abcd\"1234\"efgh". I want to extract 1234 from this string. How should I do this?

That depends on if you need to
1) find 1234 in the string and extract it
2) find the two "s and extract what's between them
3) extract the 5th through 8th characters.

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.