I hear that Prolog is based in first-order logic. This makes me wonder, C/C++ are based on which higher order logics?
If this question is incorrect, please point out that.
and how are these logics related with grammers (like context sensitive and context free) and how with lambda calculus. Are these things inter-convertible or are totally separate concepts with disjoint application areas?.
When you write a program in any language, you need a machine to execute it. In case of a Prolog it is the interpreter (itself a program executing on some machine) and in case of C/C++ that is the combination of the compiler and computer.
Speaking very roughly, for Prolog programs the behaviour of the interpreter can also be defined in first order logic. That is probably what is meant by saying that Prolog is based on first order logic. C/C++ programs, as far as I know, lack such a theoretically simple description. That is to say that I don't think that C/C++ can be said to be based on a particular widely known logic.
The "behaviour" of the interpreter of some functional languages can be described in lambda calculus, so in a sense these languages are "based" on lambda calculus.
Hope this helps