are these of the same type?int a[3]; int [3] b;

D

dick

are these of the same type?

int a[3]; int [3] b;

int c[5][6]; int [6] d[5]; int [6] [5] e;
 
E

Eric Sosman

dick said:
are these of the same type?

int a[3]; int [3] b;

No.
int c[5][6]; int [6] d[5]; int [6] [5] e;

No.

"Ask the compiler" is not always a good way to answer a
question about the language, but in this case you would have
found the compiler's answer informative.
 
M

Mark McIntyre

are these of the same type?

int a[3]; int [3] b;

int c[5][6]; int [6] d[5]; int [6] [5] e;

In each case, only the first of them is valid syntax, the others won't
compile (in a C compiler, I've no idea what a Fortran or Quzzle
compiler wold make of them).

--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,444
Messages
2,571,709
Members
48,796
Latest member
Greg L.
Top