Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
int string_compare(char s1[], char s2[]) { char *s1ptr, *s2ptr; s1ptr = s1; // s1ptr punta all'elemento s1[0] s2ptr = s2; // s2ptr punta all'elemento s2[0] while (*s1ptr!= '\0' || *s2ptr!='\0') { if (*s1ptr>*s2ptr) { return -1; } else if (*s1ptr<*s2ptr) { return 1; } else { s1ptr++; s2ptr++; } } if (*s1ptr == '\0' && *s2ptr == '\0') { return 0; } if (*s1ptr == '\0') { return 1; } if (*s2ptr == '\0') { return -1; } }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)