Shorter version of gotoxy source code

This snippet submitted by Nedeljko on 2012-04-22. It has been viewed 10148 times.
Rating of 5.1 with 60 votes

// There is a shorter version of previous snippet for *nix systems.

#include <stdio.h>

void gotoxy(int x, int y)
    printf("\033%dd\033%dG", y, x);

More C and C++ source code snippets