Answer the following questions true (T) or false (F)

1. A C-string variable with a something in it is always filled with characters.

2. It is illegal to write char message[] =”Go Home!”;


1. False
Explanation: A C-string is a partially filled array. If a C-string is stored in a C-string variable, the null character marks the position one beyond the last used character position.
2. True
Explanation: This is legal. This statement allocate space for the string that is one more character than the number of characters in the initializing string, 9 in this case, leaving space for the null terminator, ‘\0’.

Computer Science & Information Technology

You might also like to view...

The code ____________ will draw a solid circle.

a) drawCircle( 50, 50, 25 ); b) fillOval( 50, 25, 50, 25 ); c) fillOval( 50, 50, 25, 25 ); d) drawOval( 50, 50, 50, 50 );

Computer Science & Information Technology

Conducting a(n) ________ of the disaster recovery documentation for accuracy should be a standard practice for the organization

A) weekly audit B) daily check C) restructuring D) annual review

Computer Science & Information Technology

In ____ communication, the calling function sends data to the called function.

A. downward B. upward C. bi-directional D. lateral

Computer Science & Information Technology

Select theiptablesoption that specifies the destination address of packets for a rule:

A. -D B. -L C. -F D. -d

Computer Science & Information Technology