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

1. The string "Hello" could be stored in the variable str declared as follows
char str[5];
2. The assignment operator = can be used for string assignment only when initializing a string variable in its declaration.
3. If "cat" is the value of the string variable str, then str[3] is the null character.
4. If name is a string variable whose value is "Elizabeth", the function call
strcpy(target, &name[5]);
assigns the string "beth" to target.
5. The length of a string is determined by the size of the variable in which it is stored and does not depend on the value stored in the variable.

1. False
2. True
3. True
4. True
5. False

Computer Science & Information Technology

You might also like to view...

An enterprise administrator has a server that requires private communication between the application team and the administrator's team. Which of the following solutions would BEST meet this requirement?

A. Implement a NIDS B. Enable a host-based firewall C. Install a RADIUS server D. Configure IPSec

Computer Science & Information Technology

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

1. Choices made during the implementation process have no effect on execution time of your code. 2. According to the text, when adding a first entry to an array, always place it in the first element, the element whose index is zero. 3. The method toVector must “know” where the add has placed the entries. 4. The client of a class can access the class’s private members directly by use of a password. 5. The entries in a bag have no particular order.

Computer Science & Information Technology