What are the difference between array declaration in java and c plus plus?

1 answer

Answer

1111138

2026-05-04 10:00

+ Follow

There is no difference, other than that declarations in C++ can also initialise the variable in a single instruction.

C example:

int x; // declaration

x=5; // initialisation

C++ example:

int y=5; // declaration and initialisation combined.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.