C++ Programming
SIMPLE STRING TEMPLATE MCQs
Total Questions : 5
Answer is Option D. -> 4
The following are legal for non-type template parameters: integral or enumeration type, Pointer
to object or pointer to function, Reference to object or reference to function, Pointer to member.
Answer is Option A. -> same as template
None
Answer is Option A. -> type-safe
The compiler can determine at compile time whether the type associated with a template definition
can perform all of the functions required by that template definition.
Answer is Option B. -> 2
There are two types of templates. They are function template and class template.
Answer is Option B. -> 2
Answer:a
Explanation:In this program, We are passing the value to the template and printing it in the template.
Output:
$ g++ tem2.cpp
$ a.out
5.5
Hello World
Recent Questions
Q. _________ Is The Connective Tissue Beneath the Sk....
Q. Positive Integers Indicated By X And Y Satisfy 3 1/x * Y 2/....
Q. The Knocking Tendency In Compression Ignition Engines For A ....
Q. In __________verb The Action Passes From The Subject An Obje....
Q. Pre-cooling Is Required Before Passing The Vapour To The Con....
Q. Ctrl + I Is Used To
Q. Q. Consider The Following Items: Prison Trade And Co....
Q. Who Is Paul A. Volcker ?
Q. If H₁ = Inner Film Co-efficient And /h₂ = Outer Film Co-....
Q. Which One Is True About Bacteria
Q. Who Was The 1st President Of BCCI ( Board Of Control For Cri....
Q. A Combinational Logic Circuit Which Generates Particular Bin....
Q. Assertion A : To Estimate The Rainfall Over A Catchment, The....
Q. A....
Q. The Department Of Atomic Energy Was Established In
Q. In Figure, The Current I
Q. A Bar Of Square Section Of Area A² Is Held Such That It....
Q. Vane Anemometer
Q. When Low Carbon Steel Is Heated Up To Upper Critical Tempera....
Q. Metacentric Height Is Given As The Distance Between