Saylor.org 3Exam Samples cs101 Questions With 100% Correct Answer
3Exam Samples cs101 Questions With 100% Correct Answer Fill in the blank. A(n) __________ is a program that can translate instructions written in Java into byte code. Select one: a. compiler b. converter c. translator d. interpreter - answera. compiler Which of the following directories must be added to the list described in the PATH environment variable on Windows for executable programs of JDK 1.7.0? Select one: a. C:Javajdk1.7.0bin b. C:Program FilesJavajdk1.7.0 c. C:Javajdk1.7.0 d. C:Program FilesJavajdk1.7.0bin - answer1 Which of the following modifiers means that the member will only be accessible within the class? Select one: a. private b. protected c. public d. confidential - answera. private Which of the following are unique characteristics of object-oriented programming languages compared with procedure programming languages? Select one: a. functions and types b. types and classes c. classes and objects d. statements and functions - answerc Fill in the blanks. ____ and ____ are object-oriented programming languages. Select one: a. C++, FORTRAN b. FORTRAN, Java c. Java, C++ d. C, C++ - answerb What does the following code output? int x = 5, y = 9; int z = 8; int answer = (x + y) * 2 % z; Sln(answer); Select one: a. 4 b. 6 c. 8 d. 9 - answera. 4 Which of the following compound logical expressions represents "height is greater than 68 and less than 72"? Select one: a. 68 < height < 72 b. height < 68 && height > 72 c. height > 68 && height < 72 d. height > 68 || height < 72 - answerc Given the following Boolean variables: boolean p1 = false, p2 = false, p3 = true; Using a truth table, which of the following Boolean expressions has the logical value "true"? Select one: a. p1 || !p2 && p3 b. p1 && p2 || !p3 c. p1 && !p2 && p3 d. p1 || p2 || !p3 - answera. p1 || !p2 && p3 What would the value of answer be after the following code is executed? int answer = 200, w = 10; for (int k = 4; k > 2; k--) { answer = answer - w * k; } Sln(answer); Select one: a. 70 b. 100 c. 130 d. 160 - answer1 What would the value of total be after the following code is executed? int total = 0; for (int count = 1; count < 4; count++) total = total + 2 * count; Select one: a. 2 b. 6 c. 12 d. 20 - answer1 What would the following
Written for
- Institution
- Saylor
- Course
- Saylor
Document information
- Uploaded on
- February 29, 2024
- Number of pages
- 32
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
saylororg 3exam samples cs101 questions with 100
Also available in package deal