Hello, just wondering if this is possible. What i'm trying to do is to assign the length of a string to an integer variable. This is what i tried, it did not work.
This was just a test, and it did not compile. Any ideas on how to do this?Code:printf("Enter a string\n"); fgets(test_pass, 30, stdin); strcpy(x,(strlen(test_pass))); printf("%d", x);
Thanks.