What is required to avoid falling through from one case to the next?@end;@break;@Stop;@A semicolon.@B@
What keyword covers unhandled possibilities?@all@contingency@default@other@C@
Which of the following is the proper declaration of a pointer?@int x;@int &x;@ptr x;@int *x;@D@
Which of the following gives the memory address of integer variable a;?@*a;@a;@&a;@address(a);@C@
Which of the following gives the memory address of a variable pointed to by pointer a?@a;@*a;@&a;@address(a);@A@
Which of the following gives the value stored at the address pointed to by the pointer a?@a;@val(a);@*a;@&a;@C@
Which of the following is the proper keyword to allocate memory?@new@malloc@create@value@A@
Which of the following is the proper keyword to deallocate memory?@free@delete@clear@remove@B@
Which of the following accesses a variable in structure b?@b->var;@b.var;@b-var;@b>var;@B@
Which of the following accesses a variable in structure *b?@b->var;@b.var;@b-var;@b>var;@A@s
Which of the following is a properly defined struct?@struct {int a;}@struct a_struct {int a;}@struct a_struct int a;@struct a_struct {int a;};@D@
Which properly declares a variable of struct foo?@struct foo;@foo var;@foo;@int foo;@B@
Which of the following correctly declares an array?@int anarray[10];@int anarray;@anarray{10};@array anarray[10];@A@
What is the index number of the last element of an array with 29 elements?@29@28@0@Programmer-defined@B@
Which of the following is a two-dimensional array?@array anarray[20][20];@int anarray[20][20];@int array[20, 20];@char array[20];@B@
Which of the following correctly accesses the seventh element stored in foo, an array with 100 elements?@foo[6];@foo[7];@foo(7);@foo;@A@
Which of the following gives the memory address of the first element in array foo, an array with 100 elements?@foo[0];@foo;@&foo;@foo[1];@B@
Which of the following is a static string?@Static String@"Static String"@'Static String'@char string[100];@B@
What character ends all strings?@'.'@' '@'\0'@'\n'@C@
Which of the following functions compares two strings?@compare();@stringcompare();@cmp();@strcmp();@D@
Which of the following adds one string to the end of another?@append();@stringadd();@strcat();@stradd();@C@
Which of the following classes handles file input?@ofstream@ifstream@instream@inputfile@B@
Which of the following is not a valid ofstream argument?@ios::app@ios::trunc@ios::noreplace@ios::create@D@
How would you output to an open file named a_file?@a_file.out("Output");@a_file="Output";@a_file<<"Output";@a_file.printf("Output");@C@
What header file contains C++ file I/O instructions?@iostream.h@fstream.h@infstream.h@outstream.h@B@
Which header file do you need to include to use typecasting?@iostream.h@ctype.h@math.h@None@D@
Which is a valid typecast?@a(char);@char:a;@(char)a;@to(char, a);@C@
Which conversion is not possible?@int to float@float to int@char to float@All are possible@D@
What purpose do classes serve?@data encapsulation@providing a convenient way of modeling real-world objects@simplifying code reuse@all of the above@D@
Which is not a protection level provided by classes in C++?@protected@hidden@private@public@B@
Which of the following is a valid class declaration?@class A { int x; };@class B { }@public class A { }@object A { int x; };@A@
Which functions will every class contain?@None@Constructor@Destructor@Both a constructor and a destructor@D@
Which of the following is a valid inline for function foo?@inline void foo() {}@void foo() inline {}@inline:void foo() {}@None of the above@A@
What variables stores the number of arguments to a program?@argc@argv@count@arglen@A@
What is argv[0]?@The number of arguments to the program@The name of the program@The first argument to the program@This syntax is illegal@B@
What type is argv?@char *@int@char **@It's not a variable@C@
