New Cohort Summer 2026 Tech Internships are now open! Limited seats available.
← Course Detail

C & C++ Programming

Computer Science

Chapter 1 — Introduction to C and C++

Progress: 8%

Lesson 1.5 : Basic Structure of C and C++ Programs

Reading & Interactive Lesson

Lesson 1.5 FREE

Basic Structure of C and C++ Programs

Reading Material & Notes

Basic Structure of C and C++ Programs

Understanding the structure of a program is important before writing larger C and C++ applications.

Basic Structure of a C Program

#include <stdio.h>

int main()
{
    int number = 10;

    printf("Number = %d", number);

    return 0;
}

Parts of the C Program

  1. Header File: Provides declarations for library functions.
  2. main() Function: Program execution starts from the main function.
  3. Variable Declaration: Variables are declared before they are used.
  4. Statements: Instructions executed by the program.
  5. return Statement: Returns a value from the main function.

Basic Structure of a C++ Program

#include <iostream>
using namespace std;

int main()
{
    int number = 10;

    cout << "Number = " << number;

    return 0;
}

Important Programming Concepts

  • Keywords
  • Identifiers
  • Variables
  • Constants
  • Data types
  • Operators
  • Expressions
  • Statements
  • Functions

Key Points

  • Every C/C++ program has an entry point.
  • The main() function is normally the starting point of execution.
  • Header files provide library functionality.
  • C++ supports all major procedural programming concepts of C along with object-oriented features.

Course Curriculum

10 Chapters • 50 Lessons

View Course

Chapter 4 — Functions and Modular Programming

5 Lessons

LOCKED
Lesson 4.1 : Introduction to Functions
ENROLL
Lesson 4.2 : Function Parameters and Return Values
ENROLL
Lesson 4.3 : Function Declaration and Prototypes
ENROLL
Lesson 4.4 : Call by Value and Call by Reference
ENROLL
Lesson 4.5 : Recursion and Modular Programming
ENROLL

Chapter 5 — Arrays and Strings

5 Lessons

LOCKED
Lesson 5.1 : Introduction to Arrays
ENROLL
Lesson 5.2 : One-Dimensional Arrays
ENROLL
Lesson 5.3 : Two-Dimensional Arrays
ENROLL
Lesson 5.4 : Strings in C
ENROLL
Lesson 5.5 : Strings in C++
ENROLL

Chapter 6 — Pointers and References

5 Lessons

LOCKED
Lesson 6.1 : Introduction to Pointers
ENROLL
Lesson 6.2 : Pointer Arithmetic
ENROLL
Lesson 6.3 : Pointers and Arrays
ENROLL
Lesson 6.4 : Pointers and Functions
ENROLL
Lesson 6.5 : References in C++
ENROLL

Chapter 7 — Structures, Unions and Enumerations

5 Lessons

LOCKED
Lesson 7.1 : Structures in C and C++
ENROLL
Lesson 7.2 : Structure Variables and Arrays
ENROLL
Lesson 7.3 : Unions in C and C++
ENROLL
Lesson 7.4 : Enumerations
ENROLL
Lesson 7.5 : Structures, Unions and Enumerations Project
ENROLL

Chapter 8 — Object-Oriented Programming in C++

5 Lessons

LOCKED
Lesson 8.1 : Introduction to Object-Oriented Programming
ENROLL
Lesson 8.2 : Classes and Objects
ENROLL
Lesson 8.3 : Constructors and Destructors
ENROLL
Lesson 8.4 : Encapsulation and Access Specifiers
ENROLL
Lesson 8.5 : Abstraction in C++
ENROLL

Chapter 9 — Inheritance, Polymorphism and Templates

5 Lessons

LOCKED
Lesson 9.1 : Inheritance in C++
ENROLL
Lesson 9.2 : Types of Inheritance
ENROLL
Lesson 9.3 : Polymorphism in C++
ENROLL
Lesson 9.4 : Function and Operator Overloading
ENROLL
Lesson 9.5 : Templates in C++
ENROLL

Chapter 10 — File Handling and Mini Projects

5 Lessons

LOCKED
Lesson 10.1 : File Handling in C
ENROLL
Lesson 10.2 : File Handling in C++
ENROLL
Lesson 10.3 : Reading and Writing Structured Data
ENROLL
Lesson 10.4 : C and C++ Mini Project Development
ENROLL
Lesson 10.5 : Final C and C++ Project
ENROLL

C & C++ Programming

Chapters

10

Lessons

50

View Course Details