What is %lu control character in C used for?

Viewed 39

I am unable to find a proper meaning or the purpose of the %lu in C language.

I tried Googling it. I couldn't find a satisfying answer. I have attached the link where the %lu is been used in the program.

char greetings[] = {'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd', '!', '\0'};
char greetings2[] = "Hello World!";

printf("%lu\n", sizeof(greetings));   // Outputs 13
printf("%lu\n", sizeof(greetings2));  // Outputs 13

https://www.w3schools.com/c/tryc.php?filename=demo_strings_sizeof

0 Answers
Related