miscellaneous C and CPP programs