fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // printf accepts string as an argument
  5. // if you do arithmetic with the address of the strings
  6. // base address of the string GeeksQuiz - 1000
  7. // 1000 + 5 = 1000 + 5 = 1005
  8. //printf(4 + "GeeksQuiz");
  9. char *s = "Python";
  10. // printf("address of 'P' is %d\n", s);
  11. // printf("the value in the address %d is %c\n", s, *s);
  12. // printf("the next address = %d and the value in that address = %c\n", (1+s), *(1+s));
  13. printf("%s", (4+s));
  14. return 0;
  15. }
  16.  
  17. /*
  18.  
  19.  'P' 'y'
  20. -660 -660 + 1 = -659
  21.  
  22. */
Success #stdin #stdout 0s 5492KB
stdin
Standard input is empty
stdout
on