COMPUTER SCIENCE (URGENT)

COMPUTER SCIENCE (URGENT)

DO WHAT YOU CAN DO FOR NOW , YOU CAN OTHER QUESTIONS LATER . IT’S DUE IN 2 WEEKS FROM TOMORROW WORTH 100POINT.PSS: IF YOU DON’T KNOW HOW TO DO IT PLEASE LEAVE IT BLANKPSS:IF YOU ARE MR “IT’S ME” AGAIN PLEASE LET ME KNOW”

1.
A function that is called or summoned into action by its reference in another function is a ____.
A) function prototype
B) called function
C) calling function
D) function declarator
2.
The items enclosed within the parentheses in a function call statement are called ____ of the function.
A) parameters
B) formal parameters
C) arguments
D) formal arguments
3.
When a function simply receives copies of the values of the arguments and must determine where to store these values before it does anything else, this is known as a____.
A) pass by value
B) pass by reference
C) stub
D) function declarator
4.
___ is an example of a function prototype.
A) float roi(int, double);
B) printf(“%f”, roi(3, amt));
C) roi(3, amt);
D) float roi( int yrs, double rate)
5.
___ is an example of a calling statement.
A) float roi(int, double);
B) printf(“%f”, roi(3, amt));
C) float roi( int yrs, double rate);
D) float roi( int yrs, double rate)
6.
A local variable that is declared as ____ causes the program to keep the variable and its latest value even when the function that declared it is throughexecuting.
A) auto
B) static
C) extern
D) register
7.
A variable that can store an address is known as a(n) ____ variable.
A) register
B) pointer
C) static
D) extern
8.
To use a stored address, C provides us with an indirection operator, ____.
A) %
B) ^
C) &
D) *
9.
If numAddr is a pointer, ____ means the variable whose address is stored in numAddr.
A) *numAddr
B) numAddr*
C) &numAddr
D) *&numAddr
10.
A(n) ____ is a data type with two main characteristics: (1) its values can be decomposed into individual data elements, and (2) it provides an access scheme forlocating individual data elements.
A) data structure
B) scalar data type
C) array
D) atomic data type
11.
A(n) ____, is used to store and process a set of values, all of the same data type, that forms a logical group.
A) data structure
B) scalar variable
C) array
D) atomic variable
12.
Each item in an array is called a(n) ____ of the array.
A) subscript
B) variable
C) index
D) element
13.
In a one-dimensional array in C, the first element has an index of ____.
A) NULL
B) -1
C) 0
D) 1
14.
Any expression that evaluates a(n) ____ may be used as a subscript.
A) character
B) double
C) boolean
D) integer
15.
____ is a correct statement.
A) int grades[5] = {98, 87, 92, 79, 85};
B) int grades[5] = 98, 87, 92, 79, 85;
C) int grades[5] = (98, 87, 92, 79, 85);
D) int grades[5] = [98, 87, 92, 79, 85];
16.
____ declares an array of three rows and four columns.
A) int val[3,4];
B) int val[4,3];
C) int val[3][4];
D) int val[4][3];
17.
____ files store each individual character, such as a letter, digit, dollar sign, decimal point, and so on, using an individual character code.
A) Data
B) Text
C) Binary
D) ASCII
18.
The standard input stream is named ____.
A) stdin
B) stdout
C) instream
D) ostream
19.
Naming a file stream is accomplished by declaring a variable name to be of type ____.
A) FSTREAM
B) fstream
C) FILE
D) file
20.
When an array is created, the compiler automatically creates an internal ____ for it and stores the base address of the array in it.
A) pointer constant
B) address
C) symbolic constant
D) location
21.
Assuming grade is an array of ten integers, the statement ____ is invalid.
A) grade = &grade[2];
B) *grade = *(grade + 2);
C) *grade = *grade + 2;
D) *grade = *(&grade[2]) + 2;
22.
If numPtr is declared as a pointer variable, the expression ____ can also be written as numPtr[i].
A) *numPtr + i
B) (numPtr + i)
C) *numPtr
D) *(numPtr + i)
23.
Which of the following is NOT a computer language
A) Assembly
B) C++
C) Pseudocode
D) Visual Basic
24.
The C language uses which of the following to process code for the computer
A) Archiver
B) Compiler
C) Interpreter
D) Flowcharter
25.
What is the conversion specification (placeholder) for a floating point number?
A) %c
B) %d
C) %f
D) %p
26.
What is the symbol associated with the address operator.
A) &
B) *
C) @
D) |
27.
Which of the following is NOT a valid identifier
A) 4A
B) A3
C) IF
D) tax_rate
28.
Which of the following statements legally declares a character variable options.
A) char options [10];
B) char options
C) Char options ;
D) char options = ‘o’;
29.
Given x = 5,y = 5,z = 5; z = ++z * y * x++; What is the value of z ?
A) 16
B) 125
C) 150
D) 180
30.
5 &&!3 || 7 % 3 – 1
A) True
B) False
31.
int x = 328 , y = 6; printf (“%c” , x / y ); What is the output?
A) 6
B) 54
C) 54.666666
D) 55
32.
An error that causes the program to give an unexpected answer is a
A) Logical Error
B) Runtime
C) Poor Programming Practice Error
D) Syntax Error
33.
The ____ sign is a signal to a C preprocessor.
A) !
B) &
C) ;
D) #
34.
On most computer systems characters read by the keyboard are stored in a temporary holding area called a ____ immediately after they are pressed.
A) register
B) buffer
C) stack
D) RAM
35.
The expression sum = sum + 10 can be written as ____.
A) sum =+ 10
B) sum += 10
C) sum = sum ++ 10
D) sum ++ 10
36.
The logical OR operator is ____.
A) ||
B) &&
C) !
D) %%
37.
Which of the following operators has the highest precedence?
A) !
B) *
C) &&
D) ||
38.
What will the following program print on screen?

int tenure = -5;
if (tenure + 5)
printf(“Congratulations!”);
else
printf(“Sorry”);
A) Congratulations!
B) Sorry
C) Runtime error.
D) Nothing; the program will not compile.
39.
Including one or more if-else statements within an if or if-else statement is referred to as a ____ if statement.
A) compound
B) nested
C) multiway
D) short-circuit
40.
In a switch statement, the keyword ____ identifies the values that will be compared to the value of the switch expression.
A) if
B) break
C) case
D) default
41.
In a switch statement, the word ____ is optional and operates the same as the last else in an if-else chain.
A) if
B) break
C) case
D) default
42.
The technique of checking user input data for erroneous or unreasonable data is referred to as ____.
A) user-friendly programming
B) input data validation
C) if-else chaining
D) robust programming
43.
____ is not a relational operator.
A) ==
B) >
C) !=
D) ||
44.
In a(n) ____ loop the condition is tested at the end of the repeating section of code.
A) pretest
B) posttest
C) fixed-count
D) condition-controlled
45.
In the following statements, the printf statement will be executed ____ times.

count = 10;
while (count <= 10)
printf(“%d “,count);
A) 0
B) 1
C) 10
D) an infinite number of
46.
Before accumulating values, the accumulator variable should be initialized to ____.
A) -1
B) 0
C) 1
D) NULL
47.
The ____ semicolons must always be present within the for statement’s parentheses.
A) two
B) three
C) four
D) five
48.
____ uses the pointer and then increments it.
A) *ptNum–
B) *–ptNum
C) *ptNum++
D) *++ptNum
49.
int *ptNum = &miles; is ____.
A) always valid
B) never valid
C) only valid if miles is declared as an integer variable before ptNum is declared
D) only valid if miles is declared as an array of integers before ptNum is declared
50.
Taken together, all the data fields form a single unit that is referred to as a(n) ____.
A) record
B) union
C) tuple
D) array
51.
Each member of a structure is accessed by giving both the structure name and individual data item name, separated by a ____.
A) @
B) ->
C) :
D) .
52.
____ is not a valid C statement.
A) struct {int month; int day; int year;} birth;
B) struct {int month; int day; int year;} birth, current;
C) struct Date {int month; int day; int year;};
D) struct {int month, int day, int year} birth;
53.
____ creates a new data type without actually reserving any storage locations.
A) struct {int month; int day; int year;} birth;
B) struct {int month; int day; int year;} birth, current;
C) struct Date {int month; int day; int year;};
D) struct Date {int month; int day; int year;} birth;
54.
After the following declaration, you can define and initialize a variable birth of this structure type as follows ____.

struct Date
{
int month;
int day;
int year;
};
A) Date birth = {12, 28, 1987};
B) struct Date birth = {12, 28, 1987};
C) Date birth = {12; 28; 1987};
D) struct Date birth = {12; 28; 1987};
55.
A ____ statement provides a simple method for creating a new and typically shorter name for an existing structure type.
A) #define
B) typedef
C) set
D) union
56.
____ creates an array of 10 PayRecord structures.
A) struct (PayRecord employee)[10];
B) struct[10] PayRecord employee;
C) struct PayRecord[10] employee;
D) struct PayRecord employee[10];
57.
Suppose employee is an array of 10 PayRecord structures. ____ accesses the rate member of the first structure in the employee array.
A) employee.[0]rate
B) employee.rate[0]
C) employee[0].rate
D) (employee.rate)[0]
58.
____ arrays are two or more arrays, where each array has the same number of elements and the elements in each array are directly related by their position in thearrays.
A) Two-dimensional
B) Multi-dimensional
C) Parallel
D) Complex
59.
The function call ____ passes a copy of the complete emp structure to calcNet().
A) calcNet(struct emp);
B) calcNet(*emp);
C) calcNet(&emp);
D) calcNet(emp);
60.
____ is equivalent to (*pointer).member.
A) *pointer.member
B) pointer>member
C) pointer->member
D) pointer@member
61.
Enumerated lists are identified by the reserved word ____ followed by an optional, user-selected name and a required list of one or more constants.
A) list
B) typedef
C) enumerate
D) enum
62.
By default, the first enumerated name in an enumerated list has a value of ____.
A) -1
B) 0
C) 1
D) NULL
63.
Explicit values can be assigned to each enumerated constant, with unspecified values automatically continuing the integer sequence from the last specified value. Forexample, ____.
A) enum {Mon: 1, Tue, Wed, Thr, Fri, Sat, Sun};
B) enum {Mon, Tue, Wed, Thr, Fri, Sat, Sun};
Mon = 1;
C) enum {Mon = 1, Tue, Wed, Thr, Fri, Sat, Sun};
D) enum {Mon 1, Tue, Wed, Thr, Fri, Sat, Sun};
64.
Using even one ____ statement in a program is almost always a sign of bad programming structure.
A) enum
B) typedef
C) goto
D) #define
65.
C is a(n) ____ language.
A) interpreted
B) machine
C) object-oriented
D) structured
66.
Write a struct with a tag (collection) and five members suitable for a CD collection. In a separate statement declare an array of size 10 of struct collection
HTML Editor
67.
List the five steps in using files. Hint: DOCRC
HTML Editor
68.
Write code for a function Isum which sums five integer arguments and returns their sum.
HTML Editor
69.
Given the following component reliabilities below, give the expected system reliability for a system consisting of two parallel circuits ACE and DB

Component A =.10
Component B = .20
Component C = .30
Component D = .40
Component E = .50
HTML Editor
70.
Discuss the functional components and actions of a vending machine
HTML Editor
71.
A. stdlib.h
B. math.h
C. string.h
D. stdio.h
E. ctype

_scanf
_rand
_isdigit
_strcpy
_pow
72.
Discuss the five most important things you learned this semester in CSC 127
HTML Editor
73.
A. float f (int i);
B. void v (int* p)
C. i = funct(&yn);
D. void cf (char* name);
E. double df(float rain[])

_definition to pass an float array to a double function
_Call for pass by reference character to integer function
_definition for passing an integer by pointer to a void function
_prototype for passing by value an integer to a float function
_prototype for passing a string to a void function