In const parameters,?

we have written cout<<E.tyres ; and it is showing 4.
but we haven’t changed the parameters in the object that we created in the main .

what does const parameters mean .and how can we make setName as a const parameter ?

  1. as tyres is constant variable and we initialize it with 4 so it remain 4 it doesn’t change
  2. const parametes are those whose value can’t be changed during entire program you can only access them

to declare a variable as const
just write const in front of data type
const int types

in the first doubt i meant that we haven’t passed tyres while creating the object .??

we are hardcoding its value
means we are not taking it from user and then assinging
we simply intialize it with 4 so no problem in it

if you have more doubts regarding this feel free to ask

if your doubt is resolved mark it as resolved from your doubt section inside your course