This is just the initial blog of my new tech blog series to express my understanding of various concept and constructs of C/C++ programming language. So if there are any discrepancies, I hope the reader will point it out and let me know. The subjects will be random. Today we will discuss template in C++. There are two types of temples. Function templates(we will discuss it today) Class templates So what is a template? Templates are something that helps us to write generic programs. Like, in general, if want to swap to two integer number then we will have a method taking at least two int parameter or reference or pointer of the int parameter. the function can be declared as. void swap(int& a,int& b); and defined as void swap(int& a,int& b){ int temp; temp = a; a = b; b = temp; } But what if we want to swap two float number, then by the existing tool prior to templates we have to write another function with the same name but with diff