Questions and Answers
- To use internal linkage we have to use which keyword?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
static
- What is the default type of linkage that is available for identifiers?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
external
- What will be the output of these two programs?
(i)#ifndef Example_H
#define Example_H
int n = 251;
#endif
(ii)#include
#include "Example.h"
using namespace std;
int main(int argc, char * argv[] )
{
cout << num++;
return 0;
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
In this program, we have created a header file and linked that into the source program and we post incrementing that because of that it is printed as 251.
- Which one is used to refer to program elements in any translation units?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
In the external linkage, it is used to refer to identifiers in various programs.
- What is the output of this program?
#include
using namespace std;
int main()
{
typedef int number;
number P = 25, Q = 12;
number R = P + Q + P - Q;
cout << R;
return 0;
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
In this program, we are manipulating the numbers and printing the result using user-defined data types.