fork download
  1. #include <stdio.h>
  2.  
  3. void test(char const *psz_value) {
  4. printf("%p\n", psz_value);
  5. psz_value++;
  6. printf("%p\n", psz_value);
  7. (0)[(char *) psz_value] = '2';
  8. printf("%p\n", psz_value);
  9. printf("%s\n", psz_value);
  10. psz_value = NULL;
  11. printf("%s\n", psz_value);
  12. }
  13.  
  14. int main(void) {
  15. char arr_chars[] = "Test data at here.";
  16. test(arr_chars);
  17. printf("%s\n", arr_chars);
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0s 5656KB
stdin
Standard input is empty
stdout
0x7fff5d3178f0
0x7fff5d3178f1
0x7fff5d3178f1
2st data at here.
(null)
T2st data at here.