Home › Forums › C Programming › with out semicolon › Reply To: with out semicolon
March 14, 2008 at 1:10 pm
#3356
Humayan
Participant
I guess that depends on your definition of “a program”. You could just do this:
1 2 3 4 | void main()<br /> {<br /> <br /> } |
This is a do nothing program. The lack of semicolons rules out most expressions and declarations , ect. You could add an empty loop:
1 2 3 4 5 6 | while ( 1 )<br /> {}<br /> <br /> or<br /> while ( 0 )<br /> {} |
Heres a copy of the C grammar that you can check out to maybe find more:
http://www.lysator.liu.se/c/ANSI-C-grammar-y.html