Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
poinres1
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) {char *p=t;int i=10; while(*s!='\0')s++; printf("%d",s-p); i=s; while((s[i++] = p[i++])!='\0' );//{*s = *p;s++;} //for(int i=0;i<strlen(s);i++) printf("%c \n",*s); } //printf("%d \n",s); int strlen(char *s) {int i=0; while(*s!='\0'){i++;s++;} return i; } int strend(char *s, char *t) { int ls=strlen(s); int lt=strlen(t); printf("%d \n",ls); printf("%d",lt); s=s+ls-lt;printf("%c",*s); for(;*s==*t;s++,t++)if(*s!='\0')return 1; return 0; } int main() { int *ip,a=3,b[10]={1,2,3,4,5,6}; char *c=(char *)malloc(30); printf("%x\n", c); c[0] = 'f'; c[1]='\0'; puts(c); c="sirdecara"; printf("%x\n", c); char *s="lbirdecaph"; // c1 // cout<< strcmp(c,c1); //printf("%d \n",strcmp(c,c1)); // strcat(&c,&s); for(int i=1;i<strlen(c);i++) printf("%c \n",c[i]); char c1[]="adcdefghtkbjvilugrvlb"; char c2[]="ghtkbjvilugrvlb"; printf("\n%d ",strend(c1,c2));; }
gcc
Show compiler warnings
[
+
] Compiler args
[
+
]
Show input
Compilation time: 0.13 sec, absolute running time: 0.14 sec, cpu time: 0 sec, memory peak: 3 Mb, absolute service time: 0.36 sec
fork mode
|
history
|
discussion
158b010 f 400a6c i r d e c a r a 21 15g 1