Questions and Answers
- 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.
- To use internal linkage we have to use which keyword?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
static
- How are any types of linkage there in c++?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
There are three types of linkage in c++. They are an internal linkage, external linkage, and no linkage.
- What is the output of this program?
#include
using namespace std;
int GCD(int p, int q)
{
int temp;
while (q != 0)
{
temp = p % q;
p = q;
q = temp;
}
return(p);
}
int main ()
{
int m = 10, n = 120;
cout << GCD(m, n);
return(0);
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
In this program, we are finding the gcd of the number.
- When will we use the function overloading?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
In function overloading, we can use any number of arguments but same function name.