




















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





















Variables contain a value, while pointers contain a memory address.
cout << *P; *P = 177; P = 177; // This is unadvisable C … 7 3 4 … 172 173 174 175 176 177 178 179 180 181 … 174 3 4 … P 832 833 834 835 836 837 838 839 840 841 177 177
?
? 5? 5
const int MAX = 4; int main () { char *names[MAX] = { “Amir", "Ali", “Akbar", “Abid", }; for (int i = 0; i < MAX; i++) { cout << “Names[" << i << "] = "; cout << names[i] << endl; } } Output Names[0] = Amir Names[1] = Ali Names[2] = Akbar Names[3] = Abid
300 302 304 306 308 310 312 314 316 318 320 322 324 326 328 330 332 334 336 338 340 342 344 346 348 350 352 354 356 358 360 362 364 366 368 370 372 374 376 378 380 382 384 386 388 390 392 394 396 398 400 402 404 406 0 1 2 3 4 5 0 1 2 3 4 5 6 7 8 Column Row