Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
strcat
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
#include <stdio.h> //namespace std; //int strcmp(char *s, char *t){ int i=0;while((*s++==*t++)&&(*s!='\0')&&(*t!='\0')) return 0;} //int strcmp(char *s, char *t){int i; for(i=0;s[i]==t[i];i++)if(s[i]=='\0')return 0; return s[i]-t[i]; } int strcmp(char *s, char *t){ for(;*s==*t;s++,t++)if(*s=='\0')return 0; return *s - *t; } void strcat(char *s, char *t){while(*s!='\0')s++; printf("%d \n",s);} int main() { int *ip,a=3,b[10]={1,2,3,4,5,6}; char *c="sirdecarafctere"; char *c1="sigrdecaractere"; // cout<< strcmp(c,c1); printf("%d \n",strcmp(c,c1)); strcat(c,c1); // for(int i=1;i<strlen(c);c++) printf("%c \n",c[i]); }
gcc
Show compiler warnings
[
+
] Compiler args
[
+
]
Show input
Compilation time: 0.13 sec, absolute running time: 0.05 sec, cpu time: 0 sec, memory peak: 3 Mb, absolute service time: 0.26 sec
edit mode
|
history
|
discussion
11