[ create a new paste ] login | about

Link: http://codepad.org/unoEYMDk    [ 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
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

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


Output:
1
Result is -1


Create a new paste based on this one


Comments: