
debug2Main
Flashcard
•
Information Technology (IT)
•
University
•
Practice Problem
•
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
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
Derivative & Integration Rules
Flashcard
•
12th Grade
15 questions
Flashcard sobre Django e SQLite
Flashcard
•
KG - University
20 questions
Senior Week Trivia: Adulting-Our Next Journey
Flashcard
•
12th Grade
20 questions
9APGoPo Required Documents 2025
Flashcard
•
12th Grade
20 questions
Personal Finance
Flashcard
•
12th Grade
15 questions
Fused Sentences and Comma Splices
Flashcard
•
KG - University
15 questions
Trivia
Flashcard
•
Professional Development
15 questions
Limiting Reactant, Theoretical, Actual, and Percent Yield
Flashcard
•
12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Information Technology (IT)
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
5 questions
Poetry Interpretation
Interactive video
•
4th Grade - University
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
15 questions
Review1
Quiz
•
University
15 questions
Pre1
Quiz
•
University