Category: C

09
May
2017

C if else techniques

code: #include<stdio.h> int main(){ if(!printf(“Hello”)){ printf(” world\n”); }else{ printf(” Hell!”); } return 0; }  

08
May
2017

Short Circuit Feature For Logical Operators

code: #include<stdio.h> int main() { int a=-1,b=10,c; c=++a && ++b; printf(“a=%d, b=%d, c=%d\n”,a,b,c); return 0; } Expected…

08
May
2017

Logical Not Operation

#include<stdio.h> int main(){ int a=100,b=-70,i; i=!(a>b);// when we use !a it is zero as any non zero…

08
May
2017

Operator Inequality

#include<stdio.h> int main() { int a,b,i; a=200; b=200; i=a!=b; printf(“%d\n”,i); return 0; }  

07
May
2017

Typecasting Secret

code: #include<stdio.h> int main() { int a=5,b=2; float r; char ch=5; r=(float)a/b; printf(“%f”,r); return 0; } Typecasting…

03
May
2017

Pointer Clear

code: #include<stdio.h> int main() { int* pc; int c; c=22; printf(“____\n”); printf(“Address of c:%u\n”,&c); printf(“Value of C:%d\n”,c);…