10 MCQ and 7 essays
1 What command tells you what your current directory is? (Points : 5)
2. (TCO 2) Which of the following will send the standard error of mkdir /tmp/foo to /dev/null? (Points : 5)
mkdir /tmp/foo < /dev/null
mkdir /tmp/foo > /dev/null
mkdir /tmp/foo 1 > /dev/null
mkdir /tmp/foo 2 > /dev/null
3. (TCO 3) Which of the following primitive types has a size of two bytes? (Points : 5)
4. (TCO 3) Which of the following statements is correct? (Points : 5)
Identifiers can be made up of letters, digits, and the underscore (_) character.
Identifiers can use symbols such as ? or %.
Spaces are permitted inside identifiers.
Identifiers are not case sensitive.
5. (TCO 3) The acronym AWT stands for ____________. (Points : 5)
Abstract Windowing Testcase
Anonymous Windowing Testcase
Abstract Windowing Toolkit
Anonymous Windowing Toolkit
6. (TCO 3) Which of the following statements is equivalent to balance = balance + amount; ? (Points : 5)
balance += amount;
balance =+ amount;
balance == amount;
balance +== amount;
7. (TCO 7) A method can only update ____________________ parameters. (Points : 5)
8. (TCO 7) Occasionally, a class has no objects but contains a collection of related static methods and constants. Such a class is called a(n) ____________________ class.
(Points : 5)
9. (TCO 7) If you want to use a public field or method outside its class, you must ____ the name. (Points : 5)
10. (TCO 7) A method with a(n) __________ introduces additional dependencies, thus violating the rule of minimizing the coupling of classes. (Points : 5)
Unqualified instance field
1. Discuss what is an absolute and a relative path. Provide examples of both absolute path and relative path. (Points : 10)
2. (TCO 1) What is the purpose of the PATH variable? Give examples. (Points : 10)
3. (TCO 2) Create a file named file.h that will contain all the filenames ending with .h found in the /usr directory. (Points : 10)
4. (TCO 2) Discuss redirections of standard input, standard output and standard error streams. (Points : 10)
5. (TCO 2) Describe what the grep command does. Illustrate its use with an original example. (Points : 10)
6. (TCO 3) What is the purpose of the Scanner class? Explain your answer. (Points : 10)
7. (TCO 3) List and describe five rules imposed by Java on identifiers. Provide examples using Java syntax. (Points : 10)
What command tells you what your current directory is
- Technology: WriteUps-papers-Essays-Designs
- Code: SHC_WriteUp_100026