[ilugd]: a basic C/C++ question

2002-02-27 Thread Kapoor, Nishikant X
// tst.cpp #include iostream.h main() { char cArr[] = {'a','b','c','\0'}; int iArr[] = {1, 2, 3}; cout cArr= cArr iArr= iArr endl; } // Output: cArr=abc iArr=0x2ff202f8 Q: Why is iArr 0x2ff202f8 and not '123' ? Regards, Nishi

Re: [ilugd]: a basic C/C++ question

2002-02-27 Thread Sandip Bhattacharya
- Original Message - From: Kapoor, Nishikant X [EMAIL PROTECTED] Q: Why is iArr 0x2ff202f8 and not '123' ? Because for arrays,any arrays, the array variable stands for the pointer to the first index(index 0). char * is handled specially i.e. there is language support, for it to be