[leechul@~/C_Study]leechul ./iftest
when if(0)print else
when if(!0) print if
a=b
[leechul@~/C_Study]leechul cat iftest.c
#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[])
{
char a[24] = "test";
char b[24] = "test";
if (0)
{
printf("when if(0)print if\n");
}
else
{
printf("when if(0)print else\n");
}
if (!0)
{
printf("when if(!0) print if\n");
}
else
{
printf("when if(!) print else\n");
}
if (!strcasecmp(a,b))
{
printf("a=b\n");
}
return 0;
}
'C Programing' 카테고리의 다른 글
openssl lib 사용시 -lssl -lcrypto 로 링크 걸때 에러 발생시 해결방법. (0) | 2014.08.09 |
---|---|
BITWISE OPERAT ORS (0) | 2013.12.31 |
string functions and operations (0) | 2013.12.08 |
multiple-source-files (0) | 2013.12.08 |
typedef (0) | 2013.12.08 |