Run ❯
Get your
own
website
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Go to Spaces
Ctrl+Alt+P
#include
int main() { // Reserve 20 bytes of memory for a string char myString[20] = "Hello World!\0"; int memorySize = sizeof(myString); int stringSize; // Print the string and use %n to measure it printf("%s%n\n", myString, &stringSize); // Print the size of the string printf("Memory size: %d\n", memorySize); printf("String size: %d\n", stringSize); return 0; }
Hello World!
Memory size: 20
String size: 12