🌍 Worldwide · Programming

C Programming Syllabus

Roadmap to learn C programming. The full C Programming syllabus: 12 chapters, 45 topics and 154 sub-topics, with 63 flashcards written against it.

12Chapters
45Topics
154Sub-topics
63Flashcards

C Programming syllabus — full chapter and topic list

Expand any chapter to see its topics and sub-topics. This is the whole examinable outline for C Programming, not a summary of it.

  1. Introduction to C

    3 topics
    • History of C
      • Development of C
      • Influence on Other Languages
    • Features of C
      • Low-level Access
      • Portability
      • Rich Library
      • Modularity
    • Setting Up Environment
      • Installing a Compiler
      • Setting Up IDE
      • Writing First Program
  2. Basic Syntax

    4 topics
    • Structure of a C Program
      • Header Files
      • Main Function
      • Syntax Rules
    • Data Types
      • Basic Data Types
      • Derived Data Types
      • Enumerated Data Types
      • Void Data Type
    • Variables
      • Declaration
      • Initialization
      • Scope and Lifetime
    • Constants
      • Literal Constants
      • Symbolic Constants
      • Const Keyword
  3. Operators

    6 topics
    • Arithmetic Operators
      • Addition
      • Subtraction
      • Multiplication
      • Division
      • Modulus
    • Relational Operators
      • Equal to
      • Not Equal to
      • Greater than
      • Less than
      • Greater than or Equal to
      • Less than or Equal to
    • Logical Operators
      • AND
      • OR
      • NOT
    • Bitwise Operators
      • AND
      • OR
      • XOR
      • Complement
      • Shift Left
      • Shift Right
    • Assignment Operators
      • Simple Assignment
      • Add and Assign
      • Subtract and Assign
      • Multiply and Assign
      • Divide and Assign
      • Modulus and Assign
    • Miscellaneous Operators
      • Sizeof
      • Comma
      • Pointer
      • Member Selection
  4. Control Flow

    3 topics
    • Conditional Statements
      • If Statement
      • If-Else Statement
      • Nested If-Else
      • Switch Statement
    • Loops
      • For Loop
      • While Loop
      • Do-While Loop
      • Nested Loops
    • Jump Statements
      • Break
      • Continue
      • Goto
      • Return
  5. Functions

    5 topics
    • Function Basics
      • Definition
      • Declaration
      • Calling Functions
    • Parameter Passing
      • Pass by Value
      • Pass by Reference
    • Scope Rules
      • Local Variables
      • Global Variables
    • Storage Classes
      • Automatic
      • External
      • Static
      • Register
    • Recursion
      • Basic Concept
      • Types of Recursion
      • Examples
  6. Arrays and Strings

    2 topics
    • Arrays
      • One-dimensional Arrays
      • Multi-dimensional Arrays
      • Array Initialization
      • Array Operations
    • Strings
      • String Basics
      • String Functions
      • String Operations
  7. Pointers

    5 topics
    • Pointer Basics
      • Definition
      • Pointer Arithmetic
      • Pointer to Pointer
    • Pointers and Arrays
      • Pointer to Array
      • Array of Pointers
    • Pointers and Strings
      • Pointer to String
      • String Manipulation using Pointers
    • Function Pointers
      • Basics
      • Usage
    • Dynamic Memory Allocation
      • Malloc
      • Calloc
      • Realloc
      • Free
  8. Structures and Unions

    3 topics
    • Structures
      • Definition
      • Initialization
      • Accessing Members
      • Nested Structures
      • Array of Structures
      • Pointer to Structure
    • Unions
      • Definition
      • Initialization
      • Accessing Members
      • Difference between Structures and Unions
    • Bit Fields
      • Definition
      • Usage
  9. File Handling

    3 topics
    • File Operations
      • Opening a File
      • Closing a File
      • Reading from a File
      • Writing to a File
    • File Pointers
      • Definition
      • Usage
    • Error Handling
      • Detecting Errors
      • Handling Errors
  10. Preprocessor Directives

    4 topics
    • Macros
      • Definition
      • Types of Macros
      • Usage
    • File Inclusion
      • Include Directive
      • Standard Library Inclusion
      • User-defined File Inclusion
    • Conditional Compilation
      • Ifdef
      • Ifndef
      • If
      • Else
      • Elif
      • Endif
    • Other Directives
      • Define
      • Undef
      • Pragma
  11. Advanced sub-topics

    4 topics
    • Memory Management
      • Stack vs Heap
      • Memory Leaks
      • Garbage Collection
    • Multi-threading
      • Basics
      • Thread Creation
      • Synchronization
    • Network Programming
      • Sockets
      • Client-Server Model
      • Data Transmission
    • Graphics Programming
      • Basics
      • Libraries
      • Drawing Shapes
  12. Best Practices

    3 topics
    • Coding Standards
      • Naming Conventions
      • Commenting
      • Indentation
    • Code Optimization
      • Efficient Algorithms
      • Memory Usage
      • Execution Time
    • Debugging Techniques
      • Using Debuggers
      • Logging
      • Code Review

C Programming flashcards

The complete C Programming deck: 63 questions with worked answers.

  1. Who developed the C programming language, and in what year and place?

    Dennis Ritchie developed C in 1972 at Bell Laboratories (AT&T Bell Labs).

  2. C was designed as a successor to which earlier language, and for what major project was it created?

    C was a successor to the B language and was created to rewrite/implement the UNIX operating system.

  3. What is the name of the influential 1978 book that served as the informal C standard, and who wrote it?

    "The C Programming Language" (often called K&R), written by Brian Kernighan and Dennis Ritchie.

  4. What was the first official ANSI standard for C, and by what name is it commonly known?

    The 1989 ANSI standard, commonly known as ANSI C or C89 (adopted by ISO in 1990 as C90).

  5. Why is C often called a "middle-level" language?

    Because it combines features of high-level languages (structured programming, readability) with low-level capabilities (direct memory/hardware access via pointers).

  6. List four key features that make C a widely used programming language.

    Portability, efficiency/speed, a rich set of built-in operators and functions, low-level memory access via pointers, structured/modular programming, and a small compact core.

  7. What does it mean that C is a "portable" language?

    C programs written on one machine can be compiled and run on another machine with little or no modification.

  8. Name the four sequential phases a C source file passes through to become an executable.

    Preprocessing, compilation, assembly, and linking.

  9. What is the role of the C preprocessor?

    It handles directives beginning with # (like #include and #define) before compilation—expanding macros, including header files, and conditional compilation.

  10. Which command compiles a C file named prog.c into an executable using the GCC compiler with a custom output name?

    gcc prog.c -o prog

  11. What is the standard file extension for a C source file and for a C header file?

    Source files use .c and header files use .h

  12. What are the essential components of the structure of a basic C program, in order?

    Preprocessor directives (e.g. #include), optional global declarations, the main() function, and statements/expressions within functions ending with semicolons.

  13. What is the entry point of every C program, and what does its return value typically indicate?

    The main() function is the entry point; a return value of 0 indicates successful execution.

  14. Which preprocessor directive is used to include the standard input/output library, and why is it needed for printf?

    #include <stdio.h>; it provides the declaration/prototype for printf() and other I/O functions.

  15. In C, what character terminates most statements, and what encloses a block of statements?

    The semicolon (;) terminates statements; curly braces { } enclose a block of statements.

  16. List the four basic (fundamental) data types in C.

    char, int, float, and double (with void as the empty/valueless type).

  17. What is the typical size in bytes of an int, char, float, and double on a common 32/64-bit system?

    char = 1 byte, int = 4 bytes, float = 4 bytes, double = 8 bytes (sizes are implementation-defined).

  18. What are the four type qualifiers/modifiers that can be applied to integer types in C?

    signed, unsigned, short, and long.

  19. What is the range of an unsigned char, and why?

    $0$ to $255$, because 1 byte = 8 bits gives $2^{8} = 256$ distinct values ($0$ to $2^{8}-1$).

  20. What format specifier is used in printf/scanf for an int, a float, a double, a char, and a string?

    int: %d, float: %f, double: %lf, char: %c, string: %s

Show the other 43 C Programming flashcards
  1. What is a variable in C?

    A named storage location in memory whose value can be changed during program execution, associated with a specific data type.

  2. State three rules for naming a valid identifier (variable name) in C.

    Must begin with a letter or underscore; can contain only letters, digits, and underscores; cannot be a reserved keyword; and is case-sensitive.

  3. What is the difference between declaring and initializing a variable in C?

    Declaration allocates storage and specifies the type (e.g. int x;); initialization assigns an initial value at declaration (e.g. int x = 5;).

  4. What are the four storage classes in C?

    auto, register, static, and extern.

  5. What does the static storage class do to a local variable?

    It preserves the variable's value between function calls and limits its scope to the block, giving it a lifetime equal to the whole program.

  6. What is a constant in C, and name two ways to define one.

    A constant is a fixed value that cannot be changed during execution. Define via the #define preprocessor directive or the const keyword.

  7. What is the difference between #define PI 3.14 and const float PI = 3.14;?

    #define is a preprocessor macro (text substitution, no type, no memory); const creates a typed, read-only variable stored in memory that obeys scope rules.

  8. How do you write a character constant, a string constant, and an octal integer constant in C?

    Character: 'A' (single quotes); String: "Hello" (double quotes); Octal: leading 0, e.g. 0755.

  9. List the five arithmetic operators in C and give the result of $17 \% 5$.

    Addition +, subtraction -, multiplication *, division /, and modulus %. $17 \bmod 5 = 2$.

  10. In C, what is the result of the integer expression $7 / 2$ and why?

    It is $3$, because integer division truncates the fractional part (both operands are integers).

  11. What does the modulus operator % require of its operands, and what is $-7 \% 3$ typically in C99+?

    Both operands must be integers; in C99+ the result takes the sign of the dividend, so $-7 \% 3 = -1$.

  12. List the six relational operators in C.

    $<$ (less than), $>$ (greater than), $\leq$ (<=), $\geq$ (>=), $==$ (equal to), and $\neq$ (!=).

  13. What value does a relational expression evaluate to in C when it is true and when it is false?

    True evaluates to $1$ and false evaluates to $0$ (of type int).

  14. What is the common bug caused by confusing == with = in a condition?

    Using = (assignment) instead of == (comparison) assigns a value and evaluates to that value, often making the condition unintentionally true; e.g. if(x = 5) is always true.

  15. Name the three logical operators in C and what each requires.

    Logical AND &&, logical OR ||, and logical NOT !. && and || are binary; ! is unary.

  16. What is "short-circuit evaluation" for the && and || operators?

    For &&, if the left operand is false (0), the right is not evaluated; for ||, if the left is true (nonzero), the right is not evaluated.

  17. Given $a=5, b=0$, what is the value of the expression $a \;\&\&\; b$ and $a \;||\; b$ in C?

    $a \;\&\&\; b = 0$ (false, since b is 0); $a \;||\; b = 1$ (true, since a is nonzero).

  18. List the six bitwise operators in C.

    AND &, OR |, XOR ^, NOT (complement) ~, left shift <<, and right shift >>.

  19. What is the result of $5 \;\&\; 3$ and $5 \;|\; 3$ in C (bitwise)?

    $5 \;\&\; 3 = 1$ (0101 AND 0011 = 0001); $5 \;|\; 3 = 7$ (0101 OR 0011 = 0111).

  20. What arithmetic effect does a left shift by n bits ($x$ << $n$) have on an unsigned integer?

    It multiplies the value by $2^{n}$ (equivalent to $x \times 2^{n}$), filling vacated bits with 0.

  21. What does the bitwise XOR (^) operator return for each bit, and what is $6 \;\hat{}\; 3$?

    XOR returns 1 when the two bits differ, 0 when they are the same; $6 \;\hat{}\; 3 = 5$ (0110 XOR 0011 = 0101).

  22. What is the simple assignment operator, and give three examples of compound assignment operators.

    Simple assignment is =. Compound examples: +=, -=, *=, /=, %=, &=, |=, ^=, <<=, >>=.

  23. What is x += 5 shorthand for, and what does it require of x?

    It is shorthand for x = x + 5; x must be a modifiable lvalue (an assignable variable).

  24. Name five of the miscellaneous operators in C (beyond arithmetic/relational/logical).

    sizeof, the address-of operator &, the dereference operator *, the ternary conditional operator ?:, the comma operator, and the member operators . and ->.

  25. What does the ternary/conditional operator syntax look like, and rewrite "if a>b then max=a else max=b" using it?

    Syntax: condition ? expr_if_true : expr_if_false. Rewritten: max = (a > b) ? a : b;

  26. What does the sizeof operator return, and what is the type of its result?

    It returns the size in bytes of a type or variable; the result is of type size_t (an unsigned integer type).

  27. What is the difference between the prefix (++x) and postfix (x++) increment operators?

    Prefix ++x increments then yields the new value; postfix x++ yields the original value then increments.

  28. Name the three main conditional (selection) statement forms in C.

    The if statement, the if-else (and else-if ladder) statement, and the switch statement.

  29. What are the key restrictions on the switch statement's controlling expression and its case labels?

    The expression must evaluate to an integer or character (integral) type, and each case label must be a unique constant integral expression.

  30. What is the purpose of break in a switch statement, and what happens without it?

    break exits the switch after a matching case; without it, execution "falls through" and continues into subsequent cases.

  31. Name the three loop constructs in C and state which one guarantees at least one execution of its body.

    for, while, and do-while loops; the do-while loop always executes its body at least once because the condition is tested after the body.

  32. What are the three components of a for loop header, in order?

    Initialization, condition (test), and update/increment expression, written as for(init; condition; update).

  33. What is the key structural difference between a while loop and a do-while loop?

    A while loop tests the condition before the body (entry-controlled); a do-while tests after the body (exit-controlled), so do-while runs at least once.

  34. List the four jump statements in C.

    break, continue, goto, and return.

  35. What is the difference between break and continue inside a loop?

    break terminates the entire loop immediately; continue skips the rest of the current iteration and proceeds to the next iteration.

  36. What does the return statement do in a function, and what must it return in a function declared void?

    return exits the function and optionally passes a value back to the caller; in a void function it returns nothing (just "return;").

  37. What is a function in C, and what are its three related parts a programmer defines/uses?

    A function is a self-contained block of reusable code that performs a task. The three parts are the function declaration (prototype), the function definition, and the function call.

  38. What is a function prototype, and why is it used?

    A declaration specifying the function's return type, name, and parameter types (e.g. int add(int, int);); it tells the compiler how to call the function before its definition appears.

  39. In the function definition int sum(int a, int b), what is the return type and what are a and b called?

    The return type is int; a and b are the formal parameters (or formal arguments).

  40. What are the two primary methods of parameter passing in C, and which one does C use by default?

    Call by value and call by reference (via pointers); C passes arguments by value by default.

  41. In call by value, what happens to the original argument when the function modifies its parameter?

    Nothing—the function works on a copy, so changes to the parameter do not affect the original variable in the caller.

  42. How is "call by reference" achieved in C, and why does it allow a function to modify the caller's variable?

    By passing the address of a variable (a pointer) and dereferencing it inside the function; the function accesses the original memory location directly, so changes persist.

  43. When you pass an array to a function in C, what is actually passed, and what is the effect?

    A pointer to the array's first element is passed (the array decays to a pointer), so the function can modify the original array elements (effectively call by reference).

C Programming syllabus FAQ

What is in the C Programming syllabus?

The C Programming syllabus is split into 12 chapters: Introduction to C, Basic Syntax, Operators, Control Flow, Functions, Arrays and Strings, Pointers, Structures and Unions, File Handling, Preprocessor Directives, Advanced sub-topics and Best Practices. Together they contain 45 topics and 154 sub-topics.

How many chapters and topics are in the C Programming syllabus?

12 chapters and 45 topics, broken down further into 154 sub-topics. The largest chapter is Operators, with 6 topics.

Are there C Programming flashcards?

Yes — 63 question-and-answer flashcards, printed in full on this page and available in the Examius app with spaced repetition. The free plan covers one exam of your choice, including its flashcards; Examius Pro, a one-time purchase, unlocks every other exam and deck.