This is more of a micro (maybe even nano) project as opposed to other projects in this forum, so I will try to make more of this type of programs and post them here.
Rudimentary Boolean Expression Evaluator
It's in the name. Supports only 3 operations: ! (not), & (and), | (or). Does not respect order of precedence or support parenthesis.
Compilation: gcc -ansi eval.c -o eval
Usage: ./eval 'expression'
Example: ```shell
$ ./eval '0 & !1'
0
```c
#include<stdio.h>
#define s switch
#define d default
#define q case
#define b break;
#define r return
#define i int
#define ch char
i e,v,a,l; main( i k, ch*
*m){if(k!=2 )r 1;ch*c =m[1];for (;*
c;a =0, c++, e++ ) { for (;;
c++ )s( * c) {q 32: b q '!'
:a=!a;b d: goto l;} l:s (*c ){q
'0':b q'1':a =!a ; b q'&' :v= 0;b
q'|' :v= 1;b d:r 0;} s(e ){q
0:k =a; b q 1:b q 2 :if (!v
)k= k&a ;else k=k |a; e=0 ;}}
printf("%d",k );}/*==** :lo:.:re; :m ipsum dol/
or sit amet ,cons `ecte' ur adipisic*/