Skip to main content
UCLA
Computer Science
4 credits

UCLA CS 31: Introduction to Computer Science I

CS 31 is UCLA's intro programming course, taught in C++, covering control flow, functions, arrays, pointers, and basic program design. It's the first required course for CS majors and a common choice for engineering and math students adding programming skills.

Fennie is independent and not affiliated with UCLA. This is an unofficial study guide.

What makes it hard

Learning C++ as a first language on a ten-week quarter is the core difficulty: pointers and C-strings arrive before beginners have fully digested loops. The projects are specification-strict, and the exams (often associated with Professor Smallberg's famously precise style) test exact understanding of C++ behavior, including edge cases.

What you'll cover

  • C++ fundamentals and control flow
  • Functions and program decomposition
  • Arrays and C-strings
  • Pointers
  • Structs and classes
  • Debugging and program correctness

The CS 31 study guide

How to study for UCLA CS 31, step by step.

  1. 1

    Code a little every day from week one

    Ten weeks leaves no recovery time, and C++ as a first language punishes gaps. Daily practice, even 45 minutes, beats weekend bursts, especially before pointers arrive mid-quarter.

  2. 2

    Start each project the day the spec posts

    CS 31 specs are famously precise, and projects lose points to spec misreadings as often as to bugs. Read the spec twice, start immediately, and leave days for the edge cases.

  3. 3

    Learn to predict code without running it

    The exams test exact understanding of C++ behavior, including edge cases, a very different skill from debugging until it works. Trace programs on paper weekly and check your predictions against the compiler afterward.

  4. 4

    Give pointers and C-strings double the time

    They arrive before beginners have digested loops, and they're the make-or-break unit. Draw memory pictures for every pointer exercise until the indirection is second nature.

Today

Today's CS 31 plan

Preview
65 min

What a Fennie Daily Plan looks like for CS 31. Yours is built from your own syllabus and adapts every day to your deadlines and progress.

0 / 4 done~65m remaining
Keep this plan free

First plan free, no card required. Fennie is independent and unaffiliated with your school.

FAQ

Is CS 31 hard at UCLA?

For students new to programming, yes. C++ is an unforgiving first language and the quarter system gives you ten weeks. The projects are manageable if started early; the exams demand precise understanding of language behavior, not just working code.

Can I take CS 31 with no programming experience?

Yes, it assumes none, but expect to outwork classmates who've coded before. Budget consistent daily time rather than weekend bursts; in a ten-week quarter there's no slack to recover from a lost fortnight.

What's the difference between CS 31 and CS 32?

CS 31 is intro programming in C++; CS 32 is the follow-up covering data structures and algorithms, with substantially bigger projects. The 31-32 pair is UCLA's equivalent of the classic two-course intro CS sequence.

More UCLA courses