Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How do you link a C++ program to C functions?

Answer Posted / nikhil upadhyay

By using the extern "C" linkage specification around the C function declarations.
Programmers should know about mangled function names and type-safe linkages. Then they should explain how the extern "C" linkage specification statement turns that feature off during compilation so that the linker properly links function calls to C functions. Another acceptable answer is "I don't know. We never had to do that." Merely describing what a linker does indicates that the programmer does not understand the issue that underlies the question.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How the programmer of a class should decide whether to declare member function or a friend function?

1178


What are the advantages of using friend classes?

1198


What is a responder chain?

1108


What is #include cmath?

1142


What is the protected keyword used for?

1164


Comment on assignment operator in c++.

1166


Explain register storage specifier.

1048


What does the following do: for(;;) ; a) Illegal b) Loops forever c) Ignored by compiler...not illegal

1216


What is polymorphism & list its types in c++?

1116


How can we access protected and private members of a class?

1160


Is dev c++ a good compiler?

1010


What it is and how it might be called (2 methods).

1260


Why is it necessary to use a reference in the argument to the copy constructor?

1175


What is the difference between global variables and static varables?

1185


Can you use the function fprintf() to display the output on the screen?

1294