0% found this document useful (0 votes)
6 views10 pages

PRF Haysai

Uploaded by

dangphhe172554
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views10 pages

PRF Haysai

Uploaded by

dangphhe172554
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

which 2 options are correct about the function scanf?

b. scanf returns the number of addresses successfully filled of EOF

d.EOF indicates that scanf did not fill any address AND encountered an end of data character

how is a variable accessed from another file?

b. the global variable is referenced via the extern specifier

which of the following statement are true with regards to the || operator?(select al correct answer)

a.this operator is used to combine two conditional expressions which evaluate to true as a whole only if
either of the two expressions evaluate to true.

b.only if both the expressions evaluate to false, the outcome is false

what is the incorrect statement about floating-point data types(float and double)?

b.float-point means that the decimal point can float(that is, it can ba placed anywhere relative to the
significant digits)

The precedence of operators is ___

A. Arithmetic, Comparison, Logical

- What are the correct statements ? ( choose two)

A. The operator ** reads as 'the data at address'.

B. The *** operator is a unary operator and it returns the memory address of the operand

Which of these statements about primary memory are not true?

Choose at least one answer.

c. There is only one operation on primary memory and it is reading.

d. ROM is a volatile memory


Which of these statements about fundamental unit in CPU is true?

Choose one answer.

d. The natural unit of the CPU is a word

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.

c. The addresses are either register names or primary memory addresses.

d. Each program instruction consists of an operation and operands.

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.

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..

d. C is case sensitive language.


Select correct statements.

Choose at least one answer.

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.

....... helps identifying the device which will communiate with CPU.

Choose at least one answer.

b. All

Which is the correct statement about coupling ?

C. Global variables introduce a low degree of coupling

In C, select correct statements.

Choose at least one answer.

b. The expression x=y; will copy value of the variable y to the variable x.

d. A constant string must be enclosed by a pair of double quotes.

Which of the following is an invalid identifier?

Choose at least one answer.

a. employee salary

d. +ab

e. 45n
Which of these statements about constants are not true?

Choose at least one answer.

a. The compiler allocates memory for constants.

d. The compiler compiles constants.

To improve readability, programmers are recommended .......

Choose at least one answer.

a. using whitespace to identify the logical structure of the code.

c. removing continue statements.

d. using break statements as needed.

1. The rule in C is that an else statement always belongs to the innermost if available

2. The rule in C is that an else statement always belongs to the outermost if available

Choose one answer.

b. Only 1st statement is true

Program should be written ...

Choose at least one answer..

b. as a well program.

c. with a consistent style and clear throughout.


Select correct statement(s).

Choose at least one answer.

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..

In C, which of these statements are not true?

Choose at least one answer.

a. #include "filename" using with filename locate in system directory.

d. #include <filename> using with filename locate in user directory

e. # is a symbol of postprocessor indicators

Which of these statements about the function is true?

Choose one answer.

e. A function may receive data and may return a value

Select correct statement(s).

Choose at least one answer.

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.

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

d. "coincidental" - unrelated tasks


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.

c. a function that will return an integer

Which of these statements about the scanf function are true?

Choose at least one answer.

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

Select incorrect statements.

Choose at least one answer.

a. The specifier %hex is used for printing out an integer in hexadecimal 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.

Program ....

Choose at least one answer.

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.


What are the right matching?

Character Sequence

b. vertical tab \v

c. backslash \

e. backspace \b

Which of these statements about the array are true?

Choose at least one answer.

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.

e. An array is a group of related elements and they belong the same data type.

The linear search algorithm can be applied on an array in which its elements .......

Choose at least one answer.

b. are in descending order.

c. are in ascending order

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..

c. Flagging technique is used when we summarize data in an array

With respect to the binary search algorithm on an array, .......

Choose one answer.

b. The values contained in the array must be in an order (ascending or descending).


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.

c. It is usually used when user will enter a word such as the code of a product.

Which of these statements about null byte terminator are not true?

Choose one answer.

b. We can describe the null byte as the constant EOF.

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

What in the following file operations should be used when the file closed only?

Choose at least one answer.

a. renaming a file.

e. remove a file.

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.

c. With text format, data in a the file are stored as ASCII code of characters.

In C, which of following functions can be used to write data to a file?

Choose at least one answer.

b. fputc

c. fprintf

f. fputs
Text format is used. Which of these statements about table, record, and fields are not true?

Choose at least one answer.

b. Typically, one table refers to one entity of information

e. A new line delimiter must be used to separate two adjacent fields of a record.

Select correct statements.

Choose at least one answer.

a. We can rename a file if the file is closed.

e. Rewinding a file will move current position to the beginning of the file.

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

Methods are used in testing a software are .........

Choose at least one answer.

a. White box testing

b. Black box testing.


The output of a program is incorrect. It may be caused by ......

Choose at least one answer.

a. the algorithm is wrong.

b. a semantic error

You might also like