Q276
What will be the output of the following C++ code? #include using namespace std; template struct funStruct static const int val = 2*funStruct ::val; ; template<> struct funStruct static const int val = 1 ; ; int main() cout ::val << endl; return 0;
A.
1
B.
1024
AnswerC.
Error
D.
Segmentation fault
Answer: Option B
Solution
Answer: Option B
No explanation is given for this question Let's Discuss on Board