A switch example
char element_code;
element_code = 'm';
switch( element_code) {
case 's':
printf("Selenium\n");
break;
case 'm':
printf("Magnesium\n");
break;
case 'h':
printf("Hydrogen\n");
break;
}
printf("*** End ***\n");
the output is
Magnesium
*** End ***
Previous slide
Next slide
Back to first slide
View graphic version