In how many ways can a variable be declared in C++?

Q11. In how many ways can a variable be declared in C++?

Ans. In C++, a variable can be declared in 3 ways:

  1. Uninitialized variable, for example, int val;
  2. Initialized variable, for example, int val=10;
  3. Dynamically initialized variable, for example,

Int val = (b*c)-p;

Leave a Reply

Your email address will not be published. Required fields are marked *

111 Views
%d bloggers like this: