The below code compares s[2] with the string "sw". Since I have assigned s[2] = "sw", shouldn't it return 1 when I use strcmp. But I am getting 0 as the value of i.
#include <stdio.h>
#include <string.h>
int main () {
char s[2] = "sw";
int i;
i = strcmp(s, "sw");
printf("%d",i);
}