I can't understand why cout prints DATA for str variable. str does not contain the memory address of the first caracter ? What does it mean DATA ?
#include<bits/stdc++.h>
using namespace std;
int main()
{
char str[7]=”DATA”;
cout << str[2]<<” “<<str;
return 0;
}
It prints T DATA.
Thank you for your help,