
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
Create a free account and access millions of resources
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
14 questions
Journalism Article Types
Flashcard
•
12th Grade
15 questions
DNA.....
Flashcard
•
University
12 questions
Correlative conjunctions
Flashcard
•
KG
15 questions
Sampling Distributions Flashcard
Flashcard
•
12th Grade
15 questions
Confidence Interval introduction
Flashcard
•
12th Grade
15 questions
There, There pages 159-207
Flashcard
•
12th Grade
15 questions
Creating Confidence Intervals
Flashcard
•
12th Grade
15 questions
Basic Chapter 1
Flashcard
•
Professional Development
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Information Technology (IT)
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
20 questions
christmas songs
Quiz
•
KG - University
20 questions
Holiday Trivia
Quiz
•
9th Grade - University
15 questions
Holiday Movies
Quiz
•
University
14 questions
Christmas Trivia
Quiz
•
3rd Grade - University
20 questions
Christmas Trivia
Quiz
•
University
8 questions
5th, Unit 4, Lesson 8
Lesson
•
KG - Professional Dev...
20 questions
Disney Trivia
Quiz
•
University