question
string | choices
list | answer
int64 | answer_label
string | split
string | subcategories
string | lang
string | second_lang
string | coding_lang
string | notes
string | id
string | set_id
float64 | variation_id
string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
What will this code output?
#include <stdio.h>
int main() {
int x = 10;;
int *ptr = &x;;
*ptr = *ptr + 5;;
printf("%d", x);;
return 0;;
}
|
[
"10",
"15",
"Compilation error",
"5"
] | 1
|
B
|
test
|
Syntax and punctuation variations
|
eng_Latn
|
C
|
Extra semicolons:
|
67-1.11
| 67
|
1.11
|
|
What will this code output?
#include <stdio.h>
int main() {
int x = 10;
int *ptr = &x;
(*ptr) = (*ptr) + 5;
printf("%d", x);
return 0;
}
|
[
"15",
"10",
"5",
"20"
] | 0
|
A
|
test
|
Syntax and punctuation variations
|
eng_Latn
|
C
|
Extra parentheses
|
67-1.12
| 67
|
1.12
|
|
What will this code output?
#include <stdio.h>
int main() {
int x = 10;
int *ptr = &x;
*ptr = *ptr + 5 * 2;
printf("%d", x);
return 0;
}
|
[
"15",
"10",
"20",
"25"
] | 2
|
C
|
test
|
Syntax and punctuation variations
|
eng_Latn
|
C
|
Operator precedence
|
67-1.13
| 67
|
1.13
|
|
What will this code output?
using System;
class Program {
static void Main() {
int x = 10;;
ref int ptr = ref x;;
ptr = ptr + 5;;
Console.WriteLine(x);;
}
}
|
[
"10",
"15",
"5",
"20"
] | 1
|
B
|
test
|
Syntax and punctuation variations
|
eng_Latn
|
C#
|
Extra semicolons
|
69-1.14
| 69
|
1.14
|
|
What will this code output?
class Program {
static void Main() {
int x = 10;
ref int ptr = ref x;
ptr = ptr + 5;
System.Console.WriteLine(x);
}
}
|
[
"10",
"5",
"15",
"20"
] | 2
|
C
|
test
|
Syntax and punctuation variations
|
eng_Latn
|
C#
|
Explicit namespace
|
69-1.15
| 69
|
1.15
|
|
What will this code output?
|
[
"10",
"5",
"15",
"20"
] | 2
|
C
|
test
|
Syntax and punctuation variations
|
eng_Latn
|
C#
|
var keyword
|
69-1.6
| 69
|
1.6
|
|
What will this code output?
using System;
class Program {
static void Main() {
System.Int32 x = 10;
ref System.Int32 ptr = ref x;
ptr = ptr + 5;
Console.WriteLine(x);
}
}
|
[
"10",
"5",
"20",
"15"
] | 3
|
D
|
test
|
Syntax and punctuation variations
|
eng_Latn
|
C#
|
explicit types
|
69-1.7
| 69
|
1.7
|
|
What will this code output?
#include <iostream>
using namespace std;
int main() {
int x = 10;;
int *ptr = &x;;
*ptr = *ptr + 5;;
cout << x;;
return 0;;
}
|
[
"10",
"5",
"15",
"20"
] | 2
|
C
|
test
|
Syntax and punctuation variations
|
eng_Latn
|
C++
|
Extra semicolons
|
68-1.15
| 68
|
1.15
|
|
What will this code output?
#include <iostream>
using namespace std;
int main() {
int x = 10;
int *ptr = &x;
*ptr = *ptr + 5;
::std::cout << x;
return 0;
}
|
[
"10",
"5",
"20",
"15"
] | 3
|
D
|
test
|
Syntax and punctuation variations
|
eng_Latn
|
C++
|
Scope resolution
|
68-1.16
| 68
|
1.16
|
|
What will this code output?
#include <iostream>
using namespace std;
int main() {
int x = 10;
int &ptr = x;
ptr = ptr + 5;
cout << x;
return 0;
}
|
[
"10",
"15",
"5",
"20"
] | 1
|
B
|
test
|
Syntax and punctuation variations
|
eng_Latn
|
C++
|
Reference vs pointer confusion
|
68-1.17
| 68
|
1.17
|
|
What will this code output?
#include <iostream>
int main() {
int x = 10;
int *ptr = &x;
*ptr = *ptr + 5;
std::cout << x;
return 0;
}
|
[
"10",
"5",
"20",
"15"
] | 3
|
D
|
test
|
Syntax and punctuation variations
|
eng_Latn
|
C++
|
Namespace std
|
68-1.18
| 68
|
1.18
|
|
What will this code output?
#include <iostream>
using namespace std;
int main() {
{
int x = 10;
int *ptr = &x;
*ptr = *ptr + 5;
cout << x;
}
return 0;
}
|
[
"10",
"15",
"5",
"20"
] | 1
|
B
|
test
|
Syntax and punctuation variations
|
eng_Latn
|
C++
|
Extra braces
|
68-1.19
| 68
|
1.19
|
|
What will this code output?
#include <iostream>
using namespace std;
int main() {
auto x = 10;
auto *ptr = &x;
*ptr = *ptr + 5;
cout << x;
return 0;
}
|
[
"10",
"15",
"5",
"20"
] | 1
|
B
|
test
|
Syntax and punctuation variations
|
eng_Latn
|
C++
|
Keywords
|
68-1.7
| 68
|
1.7
|
|
What will this code output?
#include <iostream>
using namespace std;
int main() {
int x = 10;
int *const ptr = &x;
*ptr = *ptr + 5;
cout << x;
return 0;
}
|
[
"10",
"5",
"15",
"20"
] | 2
|
C
|
test
|
Syntax and punctuation variations
|
eng_Latn
|
C++
|
Const reference
|
68-1.8
| 68
|
1.8
|
|
What will this code output?
public class Test {
public static void main(String[] args) {
int[] arr = {3, 1, 4, 1, 5};
int sum = 0;
for (int i = 0; i < arr.length; i += 2) {
sum += arr[i];;
;;
}
System.out.println(sum);
}
}
|
[
"Compilation error",
"9",
"12",
"5"
] | 2
|
C
|
test
|
Syntax and punctuation variations
|
eng_Latn
|
java
|
Double semicolons
|
66-1.16
| 66
|
1.16
|
|
What will this code output?
public class Test {
public static void main(String[] args) {
int[] arr = {3, 1, 4, 1, 5}
;
int sum = 0;
for (int i = 0; i < arr.length; i += 2) {
sum += arr[i];
}
System.out.println(sum);
}
}
|
[
"14",
"9",
"5",
"12"
] | 3
|
D
|
test
|
Syntax and punctuation variations, Whitespace variations
|
eng_Latn
|
java
|
Semicolon at next line
|
66-1.18
| 66
|
1.18
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.