Contrast with Java on declaration locations:
Curly braces used to group statements, as in Java. But declarations cannot appear in a block, only in a method body. For example, the following is not legal C:if (x < y) {int tmp= x; x= y; y= tmp;}
Previous slide
Next slide
Back to first slide
View graphic version