Created
May 18, 2020 10:39
-
-
Save DimitriPapadopoulos/7ea5340c94c16c802367e6b42e7e2af3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | |
int main(void) | |
{ | |
size_t l = ARRAY_SIZE("[xxx.xxx.xxx.xxx], ns [xxx.xxx.xxx.xxx, xxx.xxx.xxx.xxx]"); | |
printf("ARRAY_SIZE(\"[xxx.xxx.xxx.xxx], ns [xxx.xxx.xxx.xxx, xxx.xxx.xxx.xxx]\") = %lu\n", l); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment