S
Size: a a a
S
S
s
* buffer =
new
char[100];
buffer[0] = 't';
buffer[1] = 'e';
buffer[2] = 's';
buffer[3] = 't';
buffer[4] = '\0';
std::cout <<
sizeof(buffer)/
sizeof(
char) << std::endl;
```#include <array>
#include <iostream>
int main(){
std::array<char, 100> buffer;
buffer[0] = 't';
buffer[1] = 'e';
buffer[2] = 's';
buffer[3] = 't';
buffer[4] = '\0';
std::cout << buffer.size() << std::endl;
return 0;
}
MK
AP
s
#include <array>
#include <iostream>
int main(){
std::array<char, 100> buffer;
buffer[0] = 't';
buffer[1] = 'e';
buffer[2] = 's';
buffer[3] = 't';
buffer[4] = '\0';
std::cout << buffer.size() << std::endl;
return 0;
}
s
Тᅠ
#include <array>
#include <iostream>
int main(){
std::array<char, 100> buffer;
buffer[0] = 't';
buffer[1] = 'e';
buffer[2] = 's';
buffer[3] = 't';
buffer[4] = '\0';
std::cout << buffer.size() << std::endl;
return 0;
}
S
DK
MK
Тᅠ
#include <array>
#include <iostream>
int main(){
std::array<char, 100> buffer;
buffer[0] = 't';
buffer[1] = 'e';
buffer[2] = 's';
buffer[3] = 't';
buffer[4] = '\0';
std::cout << buffer.size() << std::endl;
return 0;
}
A
NM
MK
s
#include <vector>
#include <iostream>
int main(){
std::vector<char> buffer(100);
buffer[0] = 't';
buffer[1] = 'e';
buffer[2] = 's';
buffer[3] = 't';
buffer[4] = '\0';
std::cout << buffer.size() << std::endl;
return 0;
}
NM
#include <vector>
#include <iostream>
int main(){
std::vector<char> buffer(100);
buffer[0] = 't';
buffer[1] = 'e';
buffer[2] = 's';
buffer[3] = 't';
buffer[4] = '\0';
std::cout << buffer.size() << std::endl;
return 0;
}
s
MK
Тᅠ