I am getting this error after providing the input for plaintext:
jharvard@appliance (~/Dropbox/pset2): ./caesar 3 gege Segmentation fault (core dumped)
CS50 Stack Exchange is a question and answer site for students of Harvard University's CS50. It only takes a minute to sign up.Sign up to join this community
I think the physical cause is that you are trying to write some space in memory which doesn't exist or which cannot be accessed.
In particular for your problem, it's impossible to know without more details what is causing the segmentation fault. However if I had to guess, I would think you are trying to write into a string variable through a function (which is impossible without using pointers, which you'll see in the following lessons) or are having conflicting string lengths.
Sorry I cannot be more helpful!