I'm very new to Saxophone, and I wanted to learn the octaves. However, when I played, the C sounds much much lower than a D (middle d btw). I don't know what's wrong. Am I playing it incorrectly? Please help!
What instrument do you play? What is the reed strength? If you are a beginner, you should stick to 1-1.5 reed strength (2 on the alto would be fine too). Is the instrument new or used? If used, when was it checked/repaired last?
Saxophones are notorious for having a poor low end and a big difference between middle C and middle D. I have a professional-level instrument, and I've been playing for a while, but middle D still requires a lot more diaphragm input and airflow. You eventually get used to it. Annoying your neighbours by alternating between middle C and middle D in succession is a good exercise that will get you used to the switch (which is one of the most difficult ones for a beginner to pull off). Start around G4, then go to D5. After doing that a number of times, move to A4->D5, then B4->D5, and then, finally, C4->D5.
Are you using a tuner? I recommend Tuner & Metronome by Soundcorset. The tuner will allow you to find out whether the note being played is actually within its range. If you lack experience and cannot rely on your hearing to figure out if D5 is simply more quiet than C4 or out of range, this is a good way to find out.
If one or more of your notes are out of range, the easiest way to "fix" it is to adjust the mouthpiece's position on the neck. The horn can get out of tune due to a number of reasons, the most common being temperature and "dirt". When you find a good spot for your mouthpiece to sit in, where almost all notes are in range (there will always be some that are a bit off, that's normal for even the most well-adjusted instruments), you can mark it on the cork with a pencil (make sure to use a really soft one, like 6B or 8B, so that you don't ruin the cork). I have 2 notches on my cork, 1 for winter and 1 - for summer. The "dirt" on G# and low C# keys seems to make D5 more "stuffy" as well. Those 2 keys are the keys that are closed when your instrument is "dormant", so saliva tends to build up and dry, making those keys "stick". You can clean the pads on those keys using an ear bud soaked in hydrogen peroxide, which should be available at some supermarkets and most chemists'.
Is your reed wet enough when you start playing? Soaking it in mouthwash or alcohol ~1 hour before playing is a good way to ensure it is (and that it's clean).
Now the reason why it's happening is because most of the tone holes are open when you play C4, and most of them are closed when you play D5 (and the airstream comes out in a weird place and at a weird angle too). There's plenty of articles and forum posts on the web that go into more detail about the mechanics, for example, this and that.