You can use any C stuff in a C++ program, however if it is exclusively C stuff then it's a C program.
If it has cout in it, then it's definitely C++, because you can't do that in C.
and the way main() is written as
1 2 3 4
tells me the same thing too
well that looks exactly like C to me, why would you think it was C++ ?
as for code 2: You are probably right. I was looking at void main() and jumped to conclusion it was C
I am not sure but void main() would have probably been at least a warning in C, if not an error. Different in C++, apparently since C99, one has been allowed to do this sort of thing - no return statement at end of main either.
AFAIK C programs are like this:
1 2 3 4 5 6
int main(int argc, char *argv)
printf ("This is a computer age.");
edit: main returns an int
The argc and argv stuff is optional and you can do that in C++
The EXIT_SUCCESS and similar stuff are just another way of returning a value to the OS.