Thursday, July 9, 2009

C++ programing, this is my study guide can you help me get the right answers?

1. Making a variable behave like a variable of a different data type is known as


a.typecasting


b.brute force


c.intimidation


d.variable casting


2. To redirect the input for a C++ program (theprog.exe) to come from a file rather than the keyboard you would:


a.theprog %26lt; infile.txt


b.theprog %26lt;%26lt; infile.txt


c.theprog %26gt; infile.txt


d.theprog %26gt;%26gt; infile.txt


3. if a do/while structure is used,


a) an infinite loop will not take place


b) counter controlled repetition is not possible


c) the body of the loop will execute at least once


d) an off-by-one error will not occur


4. A function prototype does not have to


a)include parameter names


b)terminate with a semicolon


c)agree with the function definition


d)match with all calls to the function


5. A function prototype does not have to


a)include parameter names


b)terminate with a semicolon


c)agree with the function definition


d)match with all calls to the function


6. For command line arguments you write your main function:


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


The argc refers to:


a.the count of the arguments passed


b.an array of pointers to strings


c.the number of people using the program


d.the size in bytes of the program

C++ programing, this is my study guide can you help me get the right answers?
1. a.


2. d.


3. c.


4. d.


5. isn't this #4?


6. a.
Reply:1. a


2. a -- I think


3. c


4.a - i think


5. same as 4 ?


6. a





Number 4 - example of prototype


void function(int number) will work if you do this as well


void function(int) I don't think poster above said it right








I know this will work.





Man whoever gave you the study guide -- really likes a answers :)





number 2 - site below answers the question. And thats what I thought before I went and looked, so I am right

periwinkle

No comments:

Post a Comment