Special Operators in C

There are lot more operators in C which are not categorized into any group those operators are special operators.

OperatorMeaningDescription
,Comma OperatorThis can be used to link the related expression together.
sizeofSizeof OperatorA compile time operator returns the number of bytes the operand occupies. For example: number_byte = sizeof(num).
&ReferenceGives the address of the normal variable.
*DereferenceGives the content of the pointer variable.
.Dot OperatorUsed to access the member of a normal structure variable.
->Arrow OperatorUsed to access the member of a pointer structure variable.
Special Operators

Example:

/*
    special operators
*/

#include <stdio.h>

int main(){
    // comma operator
    int x = 10, y, z, sizeofX;
    int *ptr;
    ptr = &x;

    // structure
    struct student {
        int roll;
    } s1, *sp1;
    sp1 = &s1;

    sizeofX = sizeof(x);
    printf("Size of x = %d\n", sizeofX);
    printf("Address of x = %p\n", &x);
    printf("Content of ptr = %d\n", *ptr);
    s1.roll = 11;
    printf("Roll of s1 = %d\n", s1.roll);
    printf("Roll of *sp1 = %d\n", sp1->roll);
    return 0;
}

Expected output:

Size of x = 4
Address of x = 000000000061FE08
Content of ptr = 10
Roll of s1 = 11
Roll of *sp1 = 11