the query is both for c as well as c++