Hello there,
I am getting the error:
error in a simple c program. The code is:Code:Segmentation fault (core dumped)
Please help.Code:#include <stdio.h> #include <stdlib.h> #include <string.h> char* encrypt(char *s) { int i, l = strlen(s); for(i = 0; i < l; i++) s[i] -= 15; return s; } int main(int argc, char *argv[]) { char* test = "This is simple encryption."; printf("%s", encrypt(test)); return 0; }