Q: How many types of linkages are there in C++?
Solution: There are three types of linkage in c++. They are an internal linkage, external linkage, and no linkage.
Q: To use internal linkage we have to use which keyword?
Solution: static keyword is used for internal linkage.
Q: Which one is used to refer to program elements in any translation units?
Solution: In the external linkage, it is used to refer to identifiers in various programs.
Q: What is the default type of linkage that is available for identifiers?
Solution: external is the default type of linkage that is available for identifiers.
Q: To use external linkage we have to use which keyword?
Solution: Extern keyword is used to represent identifiers from other programs.
Q: Which is used to use a function from one source file to another?
Solution: By defining a function’s prototype in another file means, we can inherit all the features from the source function.
Q: What is the use of no linkage?
Solution: None.
Q: What is the user-defined header file extension in c++?
Solution: .h extensions are used for user defined header files. To include a user defined header file one should use #include”name.h” i.e. enclosed within double quotes.
Q: Which of the following keyword is used to declare the header file?
Solution: The include keyword is used to include all the required things to execute the given code in the program.
Q: Identify the incorrect statement.
Solution: The iostream.h is used in the older versions of c++ and iostream is evolved from it in the std namespace.
You Have Score    | /10 |