A
Anthony Irwin
Hi,
I am new to c and am having trouble with strings can anyone give me some
quick pointers or point me to a good c strings tutorial? Below is a
program I am working on.
Kind Regards,
Anthony Irwin
#include <stdio.h>
char teststring[40] = "test string now";
char teststring1[40];
int main() {
printf("teststring = %s", teststring);
strcpy(teststring1, teststring);
printf("\nteststring1 = %s", teststring1);
/* How can I assign a new value to teststring say
* the value "I changed string text" */
printf("\n\nI changed teststring to = %s\n", teststring);
return 0;
}
I am new to c and am having trouble with strings can anyone give me some
quick pointers or point me to a good c strings tutorial? Below is a
program I am working on.
Kind Regards,
Anthony Irwin
#include <stdio.h>
char teststring[40] = "test string now";
char teststring1[40];
int main() {
printf("teststring = %s", teststring);
strcpy(teststring1, teststring);
printf("\nteststring1 = %s", teststring1);
/* How can I assign a new value to teststring say
* the value "I changed string text" */
printf("\n\nI changed teststring to = %s\n", teststring);
return 0;
}