ccplusplus.com
Learn C, C++ Concepts
Friday, February 24, 2012
array initialization c++
/************************************************************************* * File : array-initialization.cpp * Author : Saurabh Gupta * Desc : array initialization example c++ * Source : http://www.ccplusplus.com/p/c_15.html * Created : 9:12 AM Friday, February 24, 2012 * Note : *************************************************************************/ #include
using namespace std; int main() { int array[5] = {1,2}; // initialize the first two elements of the array cout<<"\nInitilization of rest of the elements\n"; for(unsigned i = 0; i < 5; ++i) { cout<<"Array["<
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment