Shorter version of gotoxy source code

This snippet submitted by Nedeljko on 2012-04-22. It has been viewed 11403 times.
Rating of 5.5 with 102 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