Parameterized constructor video

SIR WHY IN LINE NO 17 WE ARE PASSING CHAR*N,WHY WE CANT WRITE ONLY CHAR N?PL EXPLAIN

Hi @ayush15goel, this is because n will be the name of car. A name is not a single character but a string i.e. an array of characters hence we pass (char* n) which references to the string. In other words it is a char pointer referencing to the first letter of that char array/string.

Hope this helps :slight_smile: