
debug2Main

Flashcard
•
Quizizz Content
•
Information Technology (IT)
•
University
•
Hard
Student preview

20 questions
Show all answers
1.
FLASHCARD
Front
What does the following code print?
public class Test {
public static void main(String[] args) {
String str = "Hello";
str.concat(" World");
System.out.println(str);
} }
Back
Hello
2.
FLASHCARD
Front
What will the following C++ code output?
int main() {
char *ptr = "Hello";
ptr[0] = 'h';
cout << ptr;
return 0;
}
Back
Segmentation fault
3.
FLASHCARD
Front
What happens if we run the following Python snippet?
try:
x = 1 / 0
except ZeroDivisionError:
print("Zero error")
except: print("Other error")
Back
Zero error
4.
FLASHCARD
Front
What happens if a delete operator is used on a NULL pointer?
Back
Does nothing
5.
FLASHCARD
Front
Which of the following will cause memory leaks in C++? A) Not using delete after new, B) Using malloc() without free(), C) Assigning a new pointer without deleting the old one, D) All of the above
Back
All of the above
6.
FLASHCARD
Front
What is the issue with the following C++ code? int main() { int* ptr = new int; return 0; }
Back
Memory leak
7.
FLASHCARD
Front
What will be the output of this Python code?
def func():
print("Hello")
x = func()
print(x)
Back
Hello None
8.
FLASHCARD
Front
What is the purpose of this SQL query? SELECT department, AVG(salary) FROM Employees GROUP BY department;
Back
Groups employees by department and finds average salary.
9.
FLASHCARD
Front
What will the following C++ code output?
int main() {
char c = 255;
cout << (int)c;
return 0;
}
Back
-1
10.
FLASHCARD
Front
What is the issue with this Python code?
def func():
x = 10
print(x)
Back
NameError
Explore all questions with a free account
Similar Resources on Quizizz
16 questions
PYTHON CONDITIONALS Q3

•
University
15 questions
Java String and Array

•
Professional Development
20 questions
Conocimientos básicos de Python

•
University
15 questions
Flashcard on Object Oriented Programming and Java

•
University
15 questions
ARRAYLIST - JAVA

•
University
19 questions
Intro to CS Midterm Exam

•
12th Grade
13 questions
Fall Semester Exam Review (Units 1, 2)

•
12th Grade
15 questions
Computer Science 1301 Final Questions

•
University
Popular Resources on Quizizz
17 questions
CAASPP Math Practice 3rd

•
3rd Grade
15 questions
Grade 3 Simulation Assessment 1

•
3rd Grade
20 questions
math review

•
4th Grade
19 questions
HCS Grade 5 Simulation Assessment_1 2425sy

•
5th Grade
16 questions
Grade 3 Simulation Assessment 2

•
3rd Grade
21 questions
6th Grade Math CAASPP Practice

•
6th Grade
13 questions
Cinco de mayo

•
6th - 8th Grade
20 questions
Reading Comprehension

•
5th Grade
Discover more resources for Information Technology (IT)
7 questions
Food Webs and Energy Pyramids: Bedrocks of Biodiversity

•
11th Grade - University
25 questions
APUSH Decades Review

•
9th Grade - University
12 questions
Scientific Notation

•
University
96 questions
World History 1 Sol Review

•
9th Grade - University
22 questions
Spanish subjunctive

•
9th Grade - University
7 questions
Text Structure and Genre

•
4th Grade - University
20 questions
The Giver - Chapter 1-5

•
KG - University
7 questions
Force and Motion

•
4th Grade - University