علم البيانات | DS2 Quizes – Telegram
علم البيانات | DS2 Quizes
966 subscribers
96 photos
2 videos
14 files
110 links
"قناة علمية متخصصة في مجال علم البيانات، قناة خاصة بالاختبارات MCQ ."
القناة العامة: @Computer_DS_1
النقاشات: @Computer_DS1
قناة الاختبارات: @Computer_DS_2
بوت التواصل والمشاركات : @DS_Combot
Download Telegram
select the best choice among all :
Q) What does the following code print?
int num = 9; int i = 1; while (i <= 10) { cout << num << " x " << i << " = " << num * i << endl; i++; }
Anonymous Quiz
9%
A) Multiplication table of 5 up to 10
57%
B) Multiplication table of 9 up to 10
9%
C) Multiplication table of 10 up to 9
25%
D) Nothing
Q) What does the following code print?
int n = 5;
int factorial = 1; int i = 1; while (i <n) { factorial *= i; i++; } cout << "Factorial of " << n << " is " << factorial << endl;
Anonymous Quiz
17%
A) Factorial of 5 is 5
38%
B) Factorial of 5 is 120
10%
C) Factorial of 5 is 60
36%
D) Factorial of 5 is 24
select the best choice among all :
Q) What does the last code (in image) print?
Anonymous Quiz
52%
A) 12321 is a palindrome.
16%
B) 12321 is not a palindrome.
24%
C) Error
8%
D) 321
🎲 اختبار 'إختبار أساسيات برمجة بإستخدام سي بلس بلس 2️⃣'
إختبار أساسيات برمجة بإستخدام سي بلس بلس. Eng. Hazem F. Al-Huthaifi قناة علوم البيانات : @Computer_DS_1 التعليم لمن اراد والشهادة للجميع
🖊 12 سؤالًا · 45 ث
true or false (√ or ×)
Q) High-level languages require programmers to concentrate on hardware details.
Anonymous Quiz
60%
True (√)
40%
False (×)
🥰1
true or false (√ or ×)
Q) A computer program consists of a set of ordered instructions.
Anonymous Quiz
92%
True (√)
8%
False (×)
true or false (√ or ×)
Q) The output statement in C++ uses is cout.
Anonymous Quiz
93%
True (√)
7%
False (×)
true or false (√ or ×)
Q) The main() function is the starting point of a C++ program.
Anonymous Quiz
84%
True (√)
16%
False (×)
true or false (√ or ×)
Q) An interpreter translates and executes each line of the source program.
Anonymous Quiz
83%
True (√)
18%
False (×)
select the best choice among all :
Q) In a for loop, which of the following is executed only once at the beginning?
Anonymous Quiz
64%
A) Initialization
14%
B) Condition check
5%
C) Increment/Decrement
18%
D) Loop body
true or false (√ or ×)
Q) Which type of loop checks the condition before executing the loop body?
Anonymous Quiz
25%
A) for-loop
37%
B) while-loop
22%
C) do-while loop
15%
D) All of the above
👎3
select the best choice among all :
Q)In C++, what is the correct syntax to declare a switch statement?
Anonymous Quiz
78%
A) switch(variable) { case value: ... }
8%
B) switch { variable: ... }
11%
C) switch() { case value; ... }
3%
D) switch: { variable case value }
select the best choice among all :
Q) What is the size of a Boolean variable in C++?
Anonymous Quiz
27%
A) 1 bit
45%
B) 1 byte
18%
C) 4 bytes
10%
D) 2 bytes
select the best choice among all :
Q) What will be the output of the following?
int x = 3, y = 5; cout << x + y << endl;
Anonymous Quiz
6%
A) 35
94%
B) 8
1%
C) 53
select the best choice among all :
Q) What will be the output of the following?
int a = 2, b = 3, result = 1, power = b; while (power != 0) { result *= a; power--; } cout << a << " raised to the power of " << b << " is: " << result << endl;
Anonymous Quiz
25%
A) 2 raised to the power of 3 is: 6
49%
B) 2 raised to the power of 3 is: 8
13%
C) 2 raised to the power of 3 is: 9
12%
D) Error
select the best choice among all :
Q) What will be the output of the following?
int n = 5; int sum = 0; for (int i = 1; i <= n; i++) { sum += i * i; } cout << "Sum of squares from 1 to " << n << " is: " << sum << endl;
Anonymous Quiz
19%
A) Sum of squares from 1 to 5 is: 25
15%
B) Sum of squares from 1 to 5 is: 30
61%
C) Sum of squares from 1 to 5 is: 55
5%
D) Sum of squares from 1 to 5 is: 15
select the best choice among all :
Q) What will be the output of the following?
int n = 10, a = 0, b = 1, nextTerm; for (int i = 1; i <= n; ++i) { cout << a << " "; nextTerm = a + b; a = b; b = nextTerm; }
Anonymous Quiz
53%
A) 0 1 1 2 3 5 8 13 21 34
20%
B) 1 1 2 3 5 8 13 21 34
22%
C) 1 2 3 5 8 13 21 34 55
5%
D) 1 2 4 8 16 32
select the best choice among all :
Q) What will be the output of the following?
int n = 10, sum = 0; for (int i = 1; i <= n; i++) { if (i % 2 == 0) sum += i; } cout << "Sum of even numbers between 1 and " << n << " is: " << sum << endl;
Anonymous Quiz
21%
A) Sum of even numbers between 1 and 10 is: 20
60%
B) Sum of even numbers between 1 and 10 is: 30
15%
C) Sum of even numbers between 1 and 10 is: 25
4%
D) Sum of even numbers between 1 and 10 is: 15
select the best choice among all :
Q) What will be the output of the following?
int n = 5, sum = 0; for (int i = 1; i < n; ++i) { sum += i * (i + 1); } cout << "Sum of products of consecutive integers from 1 to " << n << " is: " << sum << endl;
Anonymous Quiz
34%
A) Sum of products of consecutive integers from 1 to 5 is: 55
11%
B) Sum of products of consecutive integers from 1 to 5 is: 45
48%
C) Sum of products of consecutive integers from 1 to 5 is: 40
6%
D) Sum of products of consecutive integers from 1 to 5 is: 35