PRF192

Ace your homework & exams now with Quizwiz!

b

....... helps identifying the device which will communiate with CPU. Choose at least one answer. a. Address bus. b. All c. Control bus. d. Data bus.

c

........software development model(s) has (have) some phases that are concurrently carried out. Choose one answer. a. Waterfall and practical b. None of the others. c. Practical d. Waterfall

d

Analysis and maintenance are ............. phases in the sofware development process. Choose one answer. a. intermediate b. None of the others. c. last and first d. first and last

c,d,e

Choose at least one answer. a. Walkthrough is a process in which any change in codes is recorded. b. Walkthrough process is used for evaluating the performance of a program. c. A table that contains all program variables is used in walkthrough process. d. Walkthrough is a manual process for recording all changes of program variables when the program executes instruction-by-instruction. e. A listing of the output, if any, produced by the program is carried out when we do a walkthrough..

a,b,c

Comments of a program ...... Choose at least one answer. a. are used for documenting a program. b. are omitted by the compiler. c. enhance the readability of a program. d. are translated into instructions after the program is compiled.

d

Data is stored in computer memory in ......... Choose one answer. a. decimal format. b. hexadecimal format. c. octal format. d. binary format.

b

Flags is a technique that supports using goto, continue statements Choose one answer. a. True b. False

b,d,e

In C language, the selection constructs use ....... Choose at least one answer. a. while b. switch c. for d. ?: e. if else f. if else then

a,b,d

In C, incorrect order(s) of a function implementation: Choose at least one answer. a. Return type, body, function name, parameters b. Return type, body, parameters, function name c. Return type, function name, parameters, body d. Return type, parameters, body, function name

a,d

In C, select correct statements. Choose at least one answer. a. The expression x=y; will copy value of the variable x to the variable y. b. The expression x=y; will copy value of the variable y to the variable x. c. A constant character must be enclosed by a pair of double or single quotes. d. A constant string must be enclosed by a pair of double quotes.

b,c,f

In C, which of following functions can be used to write data to a file? Choose at least one answer. a. gets b. fputc c. fprintf d. fgets e. fgetc f. fputs g. puts h. fgetchar

a,d,e

In C, which of these statements are not true? Choose at least one answer. a. #include "filename" using with filename locate in system directory. b. We can collect function prototypes into a file and refer to the file in our program c. We use the #include directive to instruct the compiler to insert a copy of the header file into our source code. d. #include <filename> using with filename locate in user directory e. # is a symbol of postprocessor indicators

c

In C, with reference to property of reusing a function, the function that will check whether an integer is a prime or not, should be declared as ........ Choose one answer. a. a void function. b. a function that returns a real number. c. a function that will return an integer. d. None of the others e. a function that returns a string a characters.

e

Marks: 1 1. Intel use this little-endian ordering 2. Motorola use middle-endian ordering 3. Motorola use big-endian ordering 4. Intel use this big-endian ordering Choose one answer. a. 2, 3 true b. All of them are true c. 1, 4 true d. 2, 4 true e. 1, 3 true f. 1, 2 true g. All of them are false

a,b

Methods are used in testing a software are ......... Choose at least one answer. a. White box testing b. Black box testing. c. Action testing d. Statement testing

b,c,d

Program .... Choose at least one answer. a. is a collection of functions. b. is a simulation of solution. c. is the result of a programming process. d. is a set of instructions that computer hardware will execute. e. is written by C language only.

b,c

Program should be written ... Choose at least one answer. a. with a complicated appearance. b. as a well program. c. with a consistent style and clear throughout. d. with significant effort and private style.

a

Restricting our use of the language to the standard subset of a language will create the ......... of a program. Choose one answer. a. portability b. efficiency c. correctness d. reliability

b,d,e

Select correct conversion specifiers for an int variable in C lanaguge. Choose at least one answer. a. %f b. %o c. %e d. %d e. %u

a,b,d

Select correct properties of C language. Choose at least one answer. a. C source code must be translated into executable code by a compiler. b. C language is a functional language. c. C language is case-insensitive language. d. C is case sensitive language. e. C language is a low-level language.

c,d

Select correct statement(s). Choose at least one answer. a. Actual parameter is a parameter in function implementation. b. Formal parameter is a parameter that is transfered to a function when it is called. c. Actual parameter is a parameter that is transfered to a function when it is called. d. Formal parameter is a parameter in function implementation.

a.e

Select correct statements. Choose at least one answer. a. We can rename a file if the file is closed. b. We can rewind a file only if the file is closed. c. We can rename a file although the file is openning. d. The file can be remove if it is openning. e. Rewinding a file will move current position to the beginning of the file.

b,c

Select correct statements. Choose at least one answer. a. A compiler will translate each statement of source code into machine code then CPU executes this statement. b. An interpreter will iterate to translate each statement of source code into machine code then CPU execute these binary code of this statement. c. Compiler of the language A can translate A-source code into language B-source code then the B-language compiler will translate B-source code into machine code. d. An interpreter will translate all source codes into machine codes then CPU executes them as a whole.

a,c

Select correct statements. Choose at least one answer. a. Flagging technique uses an integer for marking elements of an array when we summarize data of the array. b. Flagging technique is applied when user input values to an array only. c. Flagging technique is used when we summarize data in an array. d. Flagging technique helps marking some data in an array.

c,d,e

Select correct statements. With respect to ASCII, .......... Choose at least one answer. a. Binary ASCII code of the character a is 0100 0001 b. Binary ASCII code of the digit 1 is 0000 0001 c. Binary ASCII of the character A is 0100 0001 d. The code of a uppercase character is less than the code of a lowercase character. e. The code of a digit is less than the code of an alphabet.

a,c,d

Select incorrect statements. Choose at least one answer. a. The specifier %hex is used for printing out an integer in hexadecimal format. b. The specifier %e is used for printing out a real number in scientific format. c. The specifier %u is used for printing out a unsigned integer. d. The specifier %b is used to print out an integer in binary format.

a,d

Select the statements that belong to low cohesion Choose at least one answer. a. "logical" - related tasks of which only one is performed - the module identifier suggests a choice b. "functional" - performs a single specific task - the module identifier suggests a precise verb phrase c. "communicational" - the tasks share the same data - all tasks are carried out each time d. "coincidental" - unrelated tasks

c

Statement 1: If a program works then it is good designed. Statement 2: If the program models a real world situation, it can be hardly upgraded. Choose one answer. a. One of two statements is true. b. The statement 2 is true. c. Both of them are false. d. The statement 1 is true.

b,e

Text format is used. Which of these statements about table, record, and fields are not true? Choose at least one answer. a. A record is a sequence of characters that ends with a new line delimiter. b. Typically, one table refers to one entity of information c. Table is a collection of records d. A record consists of fields e. A new line delimiter must be used to separate two adjacent fields of a record. f. A field may be of any data type

b,c

The function fopen(...) is used for openning a text file. Which of the following mode parameters can not be used? Choose at least one answer. a. rt b. art c. RW d. w+t e. a+t

b

The getchar function can do Choose one answer. a. clearing the buffer automatically after retrieving b. None of the others c. treats the whitespace between the input values as a separator d. retrieves data values from every keystroke directly

b,c

The linear search algorithm can be applied on an array in which its elements ....... Choose at least one answer. a. are in no order. b. are in descending order. c. are in ascending order. d. have different data types.

a,c,d

To improve readability, programmers are recommended ....... Choose at least one answer. a. using whitespace to identify the logical structure of the code. b. using goto statements as needed. c. removing continue statements. d. using break statements as needed. e. using comments.

d

Validation do not include Choose one answer. a. out-of-range input b. invalid characters c. trailing characters d. None of the others e. incorrect number of input fields

a,b

What are the names of search algorithm applied to an array? Choose at least one answer. a. Linear search. b. Binary search. c. Random search. d. Bubble search. e. Selection search.

a,e

What in the following file operations should be used when the file closed only? Choose at least one answer. a. renaming a file. b. seeking in a file. c. rewinding a file. d. get file size. e. remove a file.

c

What library includes function to generate random numbers? Choose one answer. a. conio.h b. stdio.h c. stdlib.h d. math.h

c

Which is the result of strcmp(S1, S2) with S1 ="abcdefgh" and S2 = "abcdefdh"? Choose one answer. a. A negative integer. b. Zero. c. A positive integer. d. A character.

a,d,e

Which of the following is an invalid identifier? Choose at least one answer. a. employee salary b. False c. _123 d. +ab e. 45n f. True

a,c,d

Which of these definitions are true? Choose at least one answer. a. The CPU performs the operation on the values stored as operands or on the values stored in the operand addresses. b. The addresses are specific values of a program. c. The addresses are either register names or primary memory addresses. d. Each program instruction consists of an operation and operands. e. Each program instruction consists of an expression only.

a,d

Which of these statements about constants are not true? Choose at least one answer. a. The compiler allocates memory for constants. b. The compiler does not allocate memory for constants. c. The compiler embeds constants directly into the program instructions. d. The compiler compiles constants.

a,c

Which of these statements about file format types are true? Choose at least one answer. a. With text format, the data on the file can be modified using a text editor. b. With text format, data from a file can be read directly to a numeral variable with no tranformation. c. With text format, data in a the file are stored as ASCII code of characters. d. With binary format, data in a file can be modified using text editor.

d

Which of these statements about format string are not true? Choose one answer. a. size identifies the size of data type of the value passed. b. % flags width . precision size conversion_character c. - describes left justification of the converted value in its field d. None of the others e. 0 pads the field width with leading zeros

b

Which of these statements about null byte terminator are not true? Choose one answer. a. We refer to the null byte using the escape sequence '\0'. b. We can describe the null byte as the constant EOF. c. The null byte is the character with the value (code) 0. d. We use the null byte to locate the last meaningful element in a string

c,d

Which of these statements about primary memory are not true? Choose at least one answer. a. Primary memory holds the information accessed by the CPU. b. RAM is a volatile memory. c. There is only one operation on primary memory and it is reading. d. ROM is a volatile memory. e. Primary memory is addressable.

a

Which of these statements about the %[^ ] specifier is true when it is used in the scanf function ? Choose one answer. a. The scanf function will store the characters read in memory locations starting with the address passed to scanf b. The scanf function will read all characters until the newline character c. The scanf function will leave the delimiting character in the input buffer d. All of the others

a,c

Which of these statements about the %s conversion specifier used in scanf function are true? Choose at least one answer. a. It will read all characters until the first white space character. b. User can not enter any digit. c. It is usually used when user will enter a word such as the code of a product. d. A parameter of this function must be a string. e. It requires user entering at least 2 characters.

b,c,e

Which of these statements about the array are true? Choose at least one answer. a. In C, the index of an element can be begin from 1. b. An array is stored in contiguously block of memory and each element is identified by its index. c. The index of an element can be an integer variable, an integer expression or an integer constant. d. We use the operator () to access an element of array. e. An array is a group of related elements and they belong the same data type.

a,b,c

Which of these statements about the black-box testing are not true? Choose at least one answer. a. External factors, such as logic-driven, and path-oriented, are determinant b. Each possible path through the code is executed at least once. The number of possibilities to be tested may be too great c. Synonyms for black-box include: structural, glass-box and clear-box d. External factors, such as testing to specifications, input-output driven, and data driven, are determinant e. Synonyms for black-box include: behavioral, functional, opaque-box, and closed-box

e

Which of these statements about the function is true? Choose one answer. a. All of the others b. The body is the code block that contains the module instructions and generates the return value c. A function definition consists of a header and a body d. A function that does not return a value is called a subroutine or procedure in other languages e. A function may receive data and may return a value

c,d,e

Which of these statements about the scanf function are true? Choose at least one answer. a. The return code from scanf reflects success of %* conversions b. scanf retrieves data values from every keystroke directly c. interpreted and processed the entire format string d. scanf treats the whitespace between the input values as a separator e. If the buffer is empty, the function scanf will wait until the user adds more data values

a,e

Which type qualifiers are defined in C? Choose at least one answer. a. short b. complex c. double d. array e. long

b

With respect to the binary search algorithm on an array, ....... Choose one answer. a. this algorithm cannot be applied on array of characters. b. The values contained in the array must be in an order (ascending or descending). c. this algorithm cannot be applied on array of real numbersaracters. d. no criterion on the array is required.


Related study sets

Davie's: Part 12 Superficial Structures

View Set

Human Anatomy Chapter 5 part 2 Test HW Questions

View Set

AP Economics - Microeconomics Mid-Term

View Set

Chapter 11 Depreciation and Amortization

View Set

Real Estate Sales Person/ Broker Exam 2019 Test #6

View Set

Macroeconomics - Chapter 15 - Monetary Policy

View Set