|
The segmentation error is you are defining the size of the array as 1 and you are doing the scanf in the position 1 but it should be at 0. Also you need to specify the address of the variable and not the variable.
Try
scanf("%c",&s[0]);
Also you now know what you need to be doing with printf I guess.
|