fork(1) download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main() {
  5. char *a = "MADEEASY"; // Points to the string "MADEEASY"
  6. char *b = "GATECS2025"; // Points to the string "GATECS2025"
  7. char *r = a; // r points to the same string as a ("MADEEASY")
  8. char *s = b; // s points to the same string as b ("GATECS2025")
  9.  
  10. int length = (int)strlen(&b[3]) - (int)strlen(&s[1]);
  11.  
  12. printf("%d", length); // Prints the result of length
  13. return 0;
  14. }
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
-2