[ create a new paste ] login | about

Link: http://codepad.org/NasnLUGv    [ raw code | output | fork ]

C, pasted on Dec 7:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <stdio.h>
void cmp(char *str, char*str2, int n);
int main(){
    int num =5;
    int i;
    char str[]="asdfasJuly";
    char p[100];
    cmp(str,p,num);
    
    printf("%s", p);
}

void cmp(char *str, char*str2, int n){
    int i;
    for(i = 0; i<n; i++)
        ++str;
    while(*str)
        *str2 = *str;

}


Output:
1
Timeout


Create a new paste based on this one


Comments: