how could change c function to c++ function?
You don't have to do a thing to the function.
There are two scenarios:
1) You are compiling the C function as a C++ function.
2) You are compiling the C function as a C function and are just calling it from C++.
In case (1) you don't need to do a thing.
In case (2), you will need to disable the C++ mangler. This feature is what allows C++ to have more than one function with the same name but different arguments. The mangler produces a unique name from the function name and the arguments. This means it will mangle the name of your C function. As a result, you can't call your C function. You disable the mangler in the C++ code by identifying that the function comes from C:
-
extern "C" Shyamsundar(int a);
-
You will lose function overloading but you never had it in C anyway.