Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

40,026 questions

51,982 answers

573 users

How to replace numbers with macro in C

1 Answer

0 votes
#include <stdio.h>

#define N_ZERO               0
#define N_ONE                1
#define N_TWO                2
#define N_THREE              3
#define N_TWO_FIFTY_SIX    256
#define N_THOUSAND        1000
#define N_TEN_TWENTY_FOUR 1024

int main(void)
{
    printf("%i\n", N_ZERO);
    printf("%i\n", N_TWO_FIFTY_SIX);
    printf("%i\n", N_TEN_TWENTY_FOUR);

    return 0;
}



/*
run

0
256
1024

*/

 



answered Jun 24, 2024 by avibootz

Related questions

2 answers 205 views
1 answer 113 views
2 answers 355 views
1 answer 103 views
1 answer 123 views
1 answer 100 views
...