C++ (Qt)
int main() {
std::ifstream file_in("file_in.txt");
std::ofstream file_out("file_out.txt");
/** create the input iterator */
std::istream_iterator<char> from(file_in);
std::istream_iterator<char> to(file_in);
/** set starting position for reading */
std::advance(from, 1234);
/** set end position for reading */
std::advance(to, 4321);
/** copy the byte`s from 'from' to 'to' iterators */
std::copy(from, to, std::ostream_iterator<char>(file_out));
return 0;
}