Chapter 3


1.

What is an array?

a series of variables with the same name and the same data type, that are contiguous in memory.

2.

What does the ^ operator do?

it does an exclusive bitwise or .

3.

What is a multidimensional array?

an array with more than one dimension, such as the array int [5][4] actually has 20 elements (5 4)

4.

A string is actually an __________of ____________.

array, characters

5.

List four string methods.

 strlen , strcpy , strcat , strncat

6.

How would you initialize this array to all 0’s int myarray[4];

 int myarray[4] = {0,0,0,0};

7.

All arrays start at what index number?

0

8.

What is the purpose of the cstring header file?

to give you access to the c++ cstring class

Answers

1.

A series of variables with the same name and the same data type, that are contiguous in memory.

2.

It does an exclusive bitwise or.

3.

An array with more than one dimension, such as the array int [5][4] actually has 20 elements (5 4)

4.

array, characters

5.

strlen, strcpy, strcat, strncat

6.

int myarray[4] = {0,0,0,0};

7.

0

8.

To give you access to the C++ CString class




C++ Programming Fundamentals
C++ Programming Fundamentals (Cyberrookies)
ISBN: 1584502371
EAN: 2147483647
Year: 2005
Pages: 197
Authors: Chuck Easttom

flylib.com Ā© 2008-2017.
If you may any questions please contact us: flylib@qtcs.net