Starting Vocational Training From 1-May-2024 Get Detail


Example program for #undef preporcessor.


#include <stdio.h>

// Macro definition
#define TRUE 1
#define FALSE 0


int main()
{
    printf("TRUE: %d
", TRUE);
    printf("FALSE: %d
", FALSE);

    // Undefine a previously defined macro
    #undef TRUE
    #undef FALSE

    // Re-define macro values
    #define TRUE 0
    #define FALSE 1

    printf("
Macro values are redefinition
");
    printf("TRUE: %d
", TRUE);
    printf("FALSE: %d
", FALSE);

    return 0;
}