How to allocate 1kb of memory in C

1 Answer

0 votes
#include <stdio.h>

int main() {
    char buffer[1024] = ""; // 1024 bytes = 1kb // 1 char = 1 byte

    puts(buffer);
}




/*
run:



*/

 



answered Jan 31, 2023 by avibootz

Related questions

...