Which of the following are legal definitions with initializations? (Consider each line to be in a different scope so there is no multiple definition of identifiers.)
a. int count = 0, limit = 19;
b. int count(0), limit(19);
c. int count = 0, limit(19);
d. int limit = 19;
e. int namespace(0);
All are legal except part e) int namespace(0); because namespace is a keyword. Keywords are reserved so may not be used as an identifier.
Explanation: Note parts a), b), and c). Some authors advocate declaring each identifier in separate definitions on separate lines, though this takes up more lines. Advocates justify this by asserting increased readability. The instructor must decide this issue.
You might also like to view...
___________ scan critical system files, directories, and services to ensure they have not been changed without proper authorization.
A. Intrusion prevention systems B. System integrity verification tools C. Log analysis tools D. Network and host intrusion detection systems
Scheduling strategies are commonly evaluated by the system’s ________.
a) throughput b) mean response time c) variance of response times d) all of the above