What are templates? where we should use it?
Answers were Sorted based on User's Feedback
Answer / prabhatkr09
Template allow us to write one function and class that works for different datatype .
Use :
Create a type safe collection class that can operate on data of any type.
add extra type checking for function.
Is This Answer Correct ? | 6 Yes | 1 No |
Answer / satheeshkumar
Template allow us to write one function and class that
works for different datatype .
Use :
Create a type safe collection class that can operate on
data of any type.
add extra type checking for function.
Is This Answer Correct ? | 1 Yes | 0 No |
What is the output of the following 3D Array int arr[3][2][2]={1,2,3,4,5,6,7,8,9,10,11,12}; what is the output for arr[2][1][0]?
6 Answers HCL, Integra, IPMC, ORG,
Write a program which uses functions like strcmp(), strcpy()? etc
What is doubly linked list in c++?
What is the protected keyword used for?
What is a vector c++?
How do you declare A pointer to a function which receives nothing and returns nothing
What are the unique features of C++.
What is the difference between structure and class?
What is the difference between a definition and a declaration?
Badboy is defined who has ALL the following properties: 1. Does not have a girlfriend and is not married. 2. He is not more than 23 years old. 3. The middle name should be "Singh" 4. The last name should have more than 4 characters. 5. The character 'a' should appear in the last name at least two times. 6. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers
What are friend functions in C++?
Can a new be used in place of old mallocq? If yes, why?