Site navigation


1. Hello World

2. Variables

3. Bool

4. Arrays

5. Functions

6. Pointers

About Me

GuestBook™


|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
        

Welcome to C23 Tutorial

*** FREE C23 TUTORIAL ***

Learn the basics of the C23 programming language.


Lesson 1: Hello, World!

#include <stdio.h>

int main()
{
    printf("Hello, World!\n");
    return 0;
}
        

This program prints a message on the screen.

Back to Top


Lesson 2: Variables

#include <stdio.h>

int main()
{
    int age = 18;
    double pi = 3.14159;

    printf("%d\n", age);
    printf("%f\n", pi);

    return 0;
}
        

Variables store data in memory.

Back to Top


Lesson 3: Bool

int main()
{
    bool ok = true;

    if (ok)
    {
        return 0;
    }

    return 1;
}
        

The bool type stores true or false.(in this code used C23 and above)

Back to Top


Lesson 4: Arrays

#include <stdio.h>

int main()
{
    int numbers[5] = {1, 2, 3, 4, 5};

    printf("%d\n", numbers[0]);

    return 0;
}
        

Arrays store multiple values of the same type.

Back to Top


Lesson 5: Functions

#include <stdio.h>

int add(int a, int b)
{
    return a + b;
}

int main()
{
    printf("%d\n", add(2, 3));
    return 0;
}
        

Functions allow code reuse.

Back to Top


Lesson 6: Pointers

#include <stdio.h>

int main()
{
    int value = 42;
    int *ptr = &value;

    printf("%d\n", *ptr);

    return 0;
}
        

Pointers store memory addresses and can be used to access data indirectly.

Back to Top


C23 Topics

bool, true, false keywords
nullptr
attributes [[...]]
u8 character literals
constexpr objects
binary integer literals
named loops and labels
modern preprocessing

C23 Tutor v1.0