
debug2Main

Flashcard
•
Information Technology (IT)
•
University
•
Hard
Wayground Content
FREE Resource
Student preview

20 questions
Show all answers
1.
FLASHCARD QUESTION
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 QUESTION
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 QUESTION
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 QUESTION
Front
What happens if a delete operator is used on a NULL pointer?
Back
Does nothing
5.
FLASHCARD QUESTION
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 QUESTION
Front
What is the issue with the following C++ code? int main() { int* ptr = new int; return 0; }
Back
Memory leak
7.
FLASHCARD QUESTION
Front
What will be the output of this Python code?
def func():
print("Hello")
x = func()
print(x)
Back
Hello None
Create a free account and access millions of resources
Similar Resources on Wayground
18 questions
Flashcard on Operators

Flashcard
•
KG - University
14 questions
Bộ 4: Python cơ bản: variable, for loop, if-elif-else

Flashcard
•
University
17 questions
6th Grade Coding Vocab New

Flashcard
•
KG - University
21 questions
Java Loops

Flashcard
•
KG
10 questions
CB-IN8 Noções de Programação

Flashcard
•
KG - University
15 questions
CSE 102 Exam 3 Practice

Flashcard
•
University
20 questions
Conocimientos básicos de Python

Flashcard
•
University
10 questions
Ôn tập chủ đề F

Flashcard
•
KG
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 Information Technology (IT)
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