I found a solution - help from a guy on cprogramming.com boards - but thanks for taking time to read my problem and taking an interest.
Yes I was using popen();
I was told that gzip outputs to stderr instead of stdout. So in my popen command I was advised to change it to :
sprintf(command, "gzip -vt %s.tar.gz 2>&1", backupfilename);
Added the "2>&1" and that redirects stderr output to stdout, AND IT WORKS

!!!!!