Simple program has segmentation fault??

This is a discussion on Simple program has segmentation fault?? within the C Programming forums, part of the General Programming Boards category; Hey,
this is a simple program that reads the first number read in a file, and depending on it will ...

Simple program has segmentation fault??

Hey,
this is a simple program that reads the first number read in a file, and depending on it will display a certain message... If I try to printf the size, then it will display it with no problems, it is only when I apply the switch and if loop that I get segmentation error..?? help please!!