Step Into Labs

Step Into C · Module exam · Arrays & Strings

Exam: Caesar's Cipher

Encrypt and decrypt text in place, for any shift, positive or negative.

Part of Step Into C. The full module exam, its missions and the real compiler and debugger are in the course. Try a free lesson first to see how it works.

Julius Caesar hid his messages by moving every letter a fixed number of places along the alphabet. With a shift of 3, A becomes D and Z wraps around to C. Build the cipher machine: it reads a shift and a line of text, encrypts the text, proves it can decrypt it again, and counts the letters.

In this module exam

Missions

  1. Encrypt, decrypt, count