In Generic Programming with Templates video why last time k is used? Why the float value is not used directly?
Generic Programming with Templates
Since we didn’t assign a data type to 1.2, the compiler type casted as double by default implementation. But we want it to be treated like a float so we assigned a variable of type float to deal with it.
If your doubt is resolved please mark it as cleared.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.
But sir double and float both datatype return store floating point data. Then if we dont assign with float then also it should be treated as floating point data.
Please try what I’ve suggested once.