Sei sulla pagina 1di 3

1.Which symbol is used to make comments ? a.// b.# c.!! d.<!-2.

How would you insert pre-written code into a current program ? a.#read <file> b.#get <file> c.#include <file> d.#pre <file 3.Which symbols represent a block of code ? a.{ ... code here } b.( ... code here ) c.[ ... code here ] d.< ... code here > 4.In which standard library file is the function printf() located ? a.stdlib.h b.stdio.h c.stdout.h d.stdoutput.h 5.In order to properly use a variable... a.The variable must have a valid type. b.The variable name can not be a keyword (part of the C syntax). c.The variable name must begin with a letter. d.All of the above. 6.Which mathematical operators are in the correct order ? a.Addition, Division, Modulus b.Division, Multiplication, Modulus c.Modulus, Multiplication, Subtraction d.Modulus, Addition, Division 7.Which of the following are NOT relational operators ? a.> b.< c.== d.<= 8.The first expression in a for loop is ? a.The test expression. b.The step value of the loop. c.The value of our counter variable. d.None of the above. 9.What is the break statement used for ? a.To quit the program. b.To quit the current iteration. c.To stop the current iteration and begin the next iteration. d.None of the above. 10.What is the continue statement used for ? a.To continue to the next line of code.

b.To stop the current iteration and begin the next iteration from the beginning. c.As an alternative to the else statement. d.None of the above. 11.A function prototypes are useful a.Because they tell the compiler that a function is declared later. b.Because they make the program more readable.. c.Because they allow the programmer to see a quick list of functions in the program along with the arguments for each function. d.All of the above. 12.Because of variable scope a.Variables created in a function cannot be used another function. b.Variables created in a function can be used in another function. c.Variables created in a function can only be used in the main function d.None of the above. 13.Which symbol is used to declare a pointer ? a.& b.@ c.* d.$ 14.Which symbol is used to reference a pointer ? a.* b.& c.@ d.$ 15.Adding to a pointer that points to an array will a.Cause an error. b.Increase the value of the element that the pointer is pointing to. c.Cause the pointer to point to the next element in the array. d.None of the above. 16.To access the members of a structure, which symbol is used ? a.* b.c., d. . 17.A member is a a.Variable in a structure. b.Structure's datatype. c.Pointer to a structure. d.None of the above. 18.Structures can... a.Hold many variables of different types. b.Have pointers to structures. c.Be assigned to one another, given they are the same type. d.All of the above. 19.In a C program, the first statement that will be executed is: a.The first executable statement of the program. b.The first executable statement of the main() function.

c.The first executable statement after the comment /*start here*/ d.The first executable statement of the end function. 20.The statement: int *jack a.Declares that all variables ending with jack are ints. b.Is a pointer declaration. jack is a pointer to an int variable. c.Declares that jack is the address of a variable and that the address is an int. d.Declares that all variables starting with jack are ints.

Potrebbero piacerti anche