Tuesday, July 14, 2009

C++ study guide help?

1.Which of the following can contain data items of different types?


a.an array


b.a structure


c.a string


d.none of the above; they can only contain different values


2.For a main function defined as following:


void main(int argc, char * argv[])


Which statement below is NOT correct?


a.The first argument tells how many separate arguments were passed.


b.The second argument represents an array of strings.


c.The first (i.e. the 0th) argument is the name of the program


d.The first (i.e. the 1st) argument is the name of the program


e.none of the above


3.In C++, all variables


a.take up the same amount of storage on a certain computer type


b.take up the same amount of storage on all computer types


c.take up different amounts of storage depending on the data type


d.take up different amounts of storage depending on the length of the variable name


4.Every element of any array takes up one byte in memory


a.true


b.false


5.In object oriented programming the constructor


a.is the method called when you create an instance of that class


b.has the same name as the name of the class


c.is used to initialize variables


d.all of the above

C++ study guide help?
1-a , 2-e(maybe) 3-c 4-b 5-d


No comments:

Post a Comment