I feel really dumb asking this, but why does this code print b,b instead of b,a?
the second strcpy() is supposed to copy "a" and put it inside a[1]...
#include <stdio.h>
#include <string.h>
int main(){
char a[100][100] = {"a","b","c","d"};
char*temp = a[0];
strcpy(a[0],a[1]);
strcpy(a[1],temp);
printf ("%s %s",a[0],a[1]);
getchar();
}