O GoConqr está de visual novo! Conte para nós o que você achou.

Quiz

Multiple Choice CSC110 Questions

Tess Greenlay 22 perguntas

Fazer o quiz

Perguntas do quiz (22)

  1. 1What is the primary purpose of a complier?
    1. Ato allow programmers to edit program code
    2. Bto run programs that have been written earlier
    3. Cto translate high-level program code into instructions that can be executed
    4. Dto check programs for logical errors
  2. 2System.out.println(9 + ("8" + 7) + "6" + 5 * 4 + (3 + 2) + 1);
    1. A9"8"7"6"2051
    2. B91562051
    3. C98762051
    4. D56
  3. 3System.out.println( "/\this is a \"/total/\" \\mystery!/" );
    1. A/this is a " otal/" \\mystery!
    2. B/\this is a " otal\" \mystery!"
    3. Cthis is a /total mystery!/
    4. D/ his is a "/total/" \mystery!/
  4. 4System.out.println ( (int) 3.0 - 5 /3 * 1.5);
    1. A1.5
    2. B1
    3. C1.0
    4. D0
  5. 5String message = "Jens Weber";
    int i = message.indexOf("W");
    System.out.println(message.substring(i, i+4));
    1. AJens
    2. BWebe
    3. Ceber
    4. D6
  6. 6System.out.println(15 % 5);
    1. A0
    2. B1
    3. C3
    4. D3.0
  7. 7int times = 4;
    for (int i = 1; i <= times; times++) {
    System.out.println("Shouting Hooray! " + i);
    }
    System.out.println("Finished shouting " + times + "times");

    What of the following best describes an error in the above code?
    1. AThe for-loop declaration is incorrect
    2. BThe for-loop repeats infinitely
    3. CYou cannot print text and a variable in a println statement
    4. Dtimes is out of scope in the final println statement
  8. 8int price;
    double price_with_tax = price * 1.15;
    System.out.println("The price including tax is " + price_with_tax);

    Which of the following describes an error in the above code?
    1. AAn int cannot be multiplied with a double
    2. Bprice_with_tax is not a valid identifier
    3. CVariable price has not bee initialized
    4. DYou cannot print text and a variable in a println statement
  9. 9public static void methodA (int a, int b) {
    int y = 3 * b;
    methodB(a-3, b, y);
    }

    public static void methodB(int x, int y, int z) {
    z = x- y;
    System.out.println(z + " minus " + x + " equals " + y);
    }

    What is the output of the following statements:
    int x = 2;
    int y = 3;
    methodB(y, x, 4);
    1. A-1 minus 2 equals 3
    2. B1 minus 3 equals 2
    3. C4 minus 3 equals 2
    4. D4 minus 2 equals 3
  10. 10public static void methodA (int a, int b) {
    int y = 3 * b;
    methodB(a-3, b, y);
    }

    public static void methodB(int x, int y, int z) {
    z = x- y;
    System.out.println(z + " minus " + x + " equals " + y);
    }

    What is the output of the following statements:
    int a = 7;
    methodA(5, a);
    1. A2 minus 21 equals 4
    2. B-3 minus 4 equals 7
    3. C-5 minus 2 equals 7
    4. D7 minus 4 equals 21

Informações

Descrição
Computer Science Quiz sobre Multiple Choice CSC110 Questions, criado por Tess Greenlay em 13-12-2017.
Idioma
English
Visualizações
12
Etiquetas
computer science
Avaliação
Ainda sem avaliações
Avalie este quiz
Avalie este quiz

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?