How can you link a c program with a c function?
Answer / Sujeet Kumar Singh
To link a C program with a C function, first write the C function in a separate '.c' file and put it in a shared library (.so/.dll on Linux/Windows respectively) using a compiler like gcc or clang. Then include the header file containing the function prototype in your C++ code and use the linker to link the shared library when compiling the final C++ program.
| Is This Answer Correct ? | 0 Yes | 0 No |
which of the following is not an secondary constant a) array b) real c) union
Explain what is class definition in c++ ?
What is encapsulation in c++ with example?
Describe Trees using C++ with an example.
What is ofstream c++?
What are the vectors in c++?
What is object file? How can you access object file?
Is c++ a good first language to learn?
How do you define/declare constants in c++?
When copy constructor can be used?
What is #include ctype h in c++?
How does java differ from c and c++?