quiz 2nd/3rd year

Quiz
•
Computers
•
University
•
Medium
academicclub academicclub
Used 1+ times
FREE Resource
21 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the purpose of the `_init_` method in a Python class?
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Arrays in Java are dynamically allocated using the . . . . operator.
create
dynamic
arrayList
new
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
An Array in Java is a collection of elements of ___ data type.
Same
Different
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following is correct about features of JavaScript?
It can not Handling dates and time.
JavaScript is a object-based scripting language.
JavaScript is not interpreter based scripting language.
All of the above
5.
MULTIPLE CHOICE QUESTION
1 min • 3 pts
public class Main {
public static void main(String args[]) {
int arr[][] = new int[4][];
arr[0] = new int[1];
arr[1] = new int[2];
arr[2] = new int[3];
arr[3] = new int[4];
int i, j, k = 0;
for (i = 0; i < 4; i++) {
for (j = 0; j < i + 1; j++) {
arr[i][j] = k;
k++;
}
}
for (i = 0; i < 4; i++) {
for (j = 0; j < i + 1; j++) {
System.out.print(" " + arr[i][j]);
k++;
}
System.out.println();
}
}
}
Compiler Error
0
1 2
3 4 5
6 7 8 9
0
0 0
0 0 0
0 0 0 0
9
7 8
4 5 6
0 1 2 3
6.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
what is the output of this question?
class Test1 {
public
static void main(String[] args)
{
int x = 20;
System.out.println(x);
}
static
{
int x = 10;
System.out.print(x + " ");
}
}
10 20
20 10
10 10
20 20
7.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
Predict the output?
public class Main {
public static void main(String args[]) {
int arr[] = {10, 20, 30, 40, 50};
for(int i=0; i < arr.length; i++)
{
System.out.print(" " + arr[i]);
}
}
}
10 20 30 40 50
Compiler Error
10 20 30 40
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
JAVA

Quiz
•
University
23 questions
OCA Unit 1

Quiz
•
11th Grade - Professi...
19 questions
Quiz sobre Estructuras Selectivas en Java

Quiz
•
12th Grade - University
20 questions
C Programming Quiz

Quiz
•
University
20 questions
Module1_Quiz

Quiz
•
University
23 questions
Java Array

Quiz
•
University
25 questions
C Quiz 1

Quiz
•
University
25 questions
Java Review

Quiz
•
9th Grade - University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University