Welcome, Guest. Please login or register.

Author Topic: Mr. Biehl learns C  (Read 7856 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline PiR

  • Full Member
  • ***
  • Join Date: Apr 2003
  • Posts: 148
    • Show all replies
Re: Mr. Biehl learns C
« on: April 18, 2005, 07:29:34 PM »
Quote

MskoDestny wrote:

char string1[] "Hello ";
char string2[] "World\n";
char * tmp;

tmp = string1;
string1 = string2;
string2 = tmp



Yiekes!

To be honest this won't even compile.
Array names CAN BE CONVERTED to pointers, but are not equally pointers. So impressions, like string1 = string2 or string2 = tmp won't go, sorry.

Happy  compiling
PiR