Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
C++ Array printing
//g++ 5.4.0 #include <iostream> using namespace std; int main() { float nums[] { 1.25, 2.75, 3.25}; char name[] {'M','i','k','e','\0'}; int coords[2][3] {{1,2,3}, {4,5,6}}; cout << "nums [0]: " << nums[0] << endl; cout << "nums [1]: " << nums[1] << endl; cout << "nums [2]: " << nums[2] << endl; cout << "name[0]: " << name[0] << endl; cout << "Text string: " << name << endl; cout << "coords[0][2]: " << coords[0][2] << endl; cout << "coords[1][2]: " << coords[1][2] << endl; }
run
|
edit
|
history
|
help
0
abraham
Dar
sd2
Cpp update 1
Tejas choudhari
threadpool02
II-32bit
override
lock
typecasting