علم البيانات | DS2 Quizes – Telegram
علم البيانات | DS2 Quizes
965 subscribers
96 photos
2 videos
14 files
110 links
"قناة علمية متخصصة في مجال علم البيانات، قناة خاصة بالاختبارات MCQ ."
القناة العامة: @Computer_DS_1
النقاشات: @Computer_DS1
قناة الاختبارات: @Computer_DS_2
بوت التواصل والمشاركات : @DS_Combot
Download Telegram
Which of the following variables type in C++ that can only be accessed within the function it's declared in?
Anonymous Quiz
17%
global variable
58%
local variable
10%
Constant variable
15%
All of above.
🔥1
What is the output of the following code?
int myFunction(int x, int y = 10) {
return x + y;
}

int main() {
int a = 5;
int b = myFunction(a);
cout << b << endl;
return 0;
}
What is the output of the following code?
int myFunction(int x, int y = 10) {
return x + y; } int main() { int a = 5; int b = myFunction(a); cout << b << endl; return 0; }
Anonymous Quiz
22%
5
8%
10
54%
15
16%
Error
1
Which of the following is the correct way to define a function with reference parameters?
Anonymous Quiz
13%
(int x)
65%
(int &x)
8%
(const int x)
15%
None of the above
1
Which of the following is the correct way to define a function with default parameters?
Anonymous Quiz
37%
int subFun(int y ,int &x = 0);
30%
int subFun(int x = 0, int y);
10%
int subFun(const int x = 0, int y);
24%
None of the above
👍1
What is the output of the following code?
void myFunction(int &x, int y) {
x = x + y;
}

int main() {
int a = 5;
int b = 10;
myFunction(a, b);
cout << a << endl;
return 0;
}
What is the output of the following code?
void myFunction(int &x, int y) {
x = x + y; } int main() { int a = 5; int b = 10; myFunction(a, b); cout << a << endl; return 0; }
Anonymous Quiz
36%
5
8%
10
45%
15
11%
Error
2👍1
What is the output of the following code?
void myFunction(int &x, int y) {
  x = x + y;
}

int main() {
  int a = 5;
  int b = 10;
cout << a << endl;
  myFunction(a, b);
  return 0;
}
What is the output of the following code?
void myFunction(int &x, int y) {
  x = x + y; } int main() {   int a = 5;   int b = 10; cout << a << endl;   myFunction(a, b);   return 0; }
Anonymous Quiz
58%
5
29%
15
3%
10
11%
Error
1👍1
true or false:
To use a predefined function in a program, you need to know only the name of the function and how to use it.
Anonymous Quiz
59%
true
41%
false
👏21👍1
true or false:
A value-returning function returns only one value.
Anonymous Quiz
71%
true
29%
false
👍1
true or false:
Parameters allow you to use different values each time the function is called.
Anonymous Quiz
84%
true
16%
false
1
true or false:
When a return statement executes in a user-defined function, the function immediately exits.
Anonymous Quiz
73%
true
27%
false
1
true or false:
A value-returning function returns only integer values.
Anonymous Quiz
30%
true
70%
false
1
true or false:
A function that changes the value of a reference parameter also changes the value of the actual parameter.
Anonymous Quiz
78%
true
22%
false
1
true or false:
A variable name cannot be passed to a value parameter.
Anonymous Quiz
42%
true
58%
false
true or false:
If a C++ function does not use parameters, parentheses around the empty parameter list are still required.
Anonymous Quiz
67%
true
33%
false
🥰21
true or false:
In C++, the names of the corresponding formal and actual parameters must be the same.
Anonymous Quiz
44%
true
56%
false
👍1
true or false:
Whenever the value of a reference parameter changes, the value of the actual parameter changes.
Anonymous Quiz
79%
true
21%
false
1
true or false:
In C++, function definitions can be nested; that is, the definition of one function can be enclosed in the body of another function.
Anonymous Quiz
58%
true
42%
false
👍1