Kuis Pointer 1

Quiz
•
Information Technology (IT)
•
University
•
Hard
089_Gradiva undefined
Used 2+ times
FREE Resource
6 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
void modify(int*& ptr) {
int local = 20;
ptr = &local;
}
int main() {
int x = 10;
int* p = &x;
modify(p);
cout << *p << endl; // Apa hasil ini?
}
20
10
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int main() {
int arr[] = {10, 20, 30, 40};
int* p = arr + 2;
cout << (p++) << " " << (++p) << endl; // Apa hasil ini?
}
30 40
40 30
30 (angka acak)
40 (angka acak)
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int main() {
int* p = nullptr;
if (p)
cout << "Not null";
else
cout << "Null";
}
Not null
Null
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int main() {
int a = 10;
int* p1 = &a;
int*& ref = p1;
int b = 20;
ref = &b;
cout << p1 << " " << ref << endl;
}
20 10
10 10
10 20
20 20
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int main() {
int x = 10;
int* p = &x;
delete p;
cout << x << endl;
}
10
Compile error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int main() {
int arr[] = {1, 2, 3, 4, 5};
int* p = arr + 4;
cout << *(p - 2) << endl;
}
2
3
4
Undefined (nilai gajelas)
Similar Resources on Wayground
10 questions
Web Programming Quiz in Portuguese

Quiz
•
University
10 questions
Pemrograman & Aplikasi Mikrokontroler (Pengenalan IDE)

Quiz
•
11th Grade - University
10 questions
Declaration and Initialization of Variables in C++

Quiz
•
University
10 questions
Quiz 2

Quiz
•
University
10 questions
QUIZ 2 PLC

Quiz
•
10th Grade - University
10 questions
Мәтінді форматтау

Quiz
•
10th Grade - University
10 questions
Kiểm tra kiến thức về HTML + CSS

Quiz
•
University
10 questions
KUIS DENGAN TOPIK MATERI PERTEMUAN 1

Quiz
•
10th Grade - University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Information Technology (IT)
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University