Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons
  • Teach on BraveProgrammer

© 2026 BraveProgrammer. All rights reserved.

Basic Syntax & Structure | C Programming Fundamentals lesson | BraveProgrammer
  1. Courses
  2. /
  3. C Programming Fundamentals

Lesson 3 of 50

·c

Basic Syntax & Structure

7 mins

Course progress6%

What you'll learn

Keep these ideas in mind as you work through the lesson.

4 points
  • Every program must have a `main` function.
  • Statements end with a semicolon.
  • Curly braces define a block scope.
  • Two comment styles: // and /* */.

Every C source file is a collection of function definitions. The entry point is int main(void) (or int main(int argc, char *argv[])).

Key syntax rules:

  • Statements end with a semicolon ;.
  • Blocks are inside curly braces {}.
  • Comments: // line comment and /* block comment */.
  • The language is case‑sensitive.
int main(void) {
    // code goes here
    return 0;
}
Make it stickPractice what you've learned1 quiz · 3 practical tests · Optional activities from C Programming FundamentalsBrowse activities
Previous lessonSetting Up a Development EnvironmentContinue to lesson 4Data Types & SizesBack to C Programming Fundamentals curriculum