0

what does [100] means in char a[100]; ?

#include <stdio.h> int main() { ----> char a[100]; <---- gets(a); printf("You entered: %s", a); return 0; }

23rd Mar 2020, 4:15 PM
Moshiur Miraz
Moshiur Miraz - avatar
2 Respuestas
+ 3
That means you get memory reserved for 100 letters. Each letter can be accessed using an index between 0 and 99.
23rd Mar 2020, 4:21 PM
HonFu
HonFu - avatar
+ 2
You get memory reserved for 100 char variables and you can access using an index between 0 and 99 For example char a[0] = char b
23rd Mar 2020, 4:29 PM
Logvynov Dmytro
Logvynov Dmytro - avatar