[ create a new paste ] login | about

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

slevy1ster - C, pasted on Mar 11:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

/*int comp_string(char **a, char **b) {
	return(strcmp(*a,*b));
}
*/
int main(void)
{
    char *x = "2";
    char *y = "3";
    int i;
    i = strcmp(x,y);
    
    printf("Result is %d\n",i);
    return 0;
}


Output:
1
Result is -1


Create a new paste based on this one


Comments: