In Emacs, is it possible to mark all variables of different data types with different colors? e.g. if I have the following variables in C/C++ my program
int
No, it's not possible to selectively assign a given color to a given variable in emacs (or just for one given program).
However, if it's just syntax highlighting you are looking for, of course, emacs will highlight most languages, and you can even create syntax highlighting for languages emacs would not know about.
Ex. Smali: https://github.com/strazzere/Emacs-Smali