علم البيانات | 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
Which header file is required to use file I/O operations?
Anonymous Quiz
25%
<iostream>
64%
<fstream>
2%
<ostream>
9%
<ifstream>
Which of the following is used to create an output stream?
Anonymous Quiz
4%
fsstream
32%
iostream
8%
ifstream
56%
ofstream
Which of the following is used for comments in C++?
Anonymous Quiz
90%
/* comment */
4%
'comment'
6%
both
What will be the output of the following C++ program?
#include <iostream>
using namespace std; enum colour { green, red, blue, white, yellow, pink }; int main() { cout << green<< red<< blue<< white<< yellow<< pink; return 0; }
Anonymous Quiz
15%
123456
62%
012345
9%
runtime error
14%
compile time error
Which of the following code will give error on compilation?
==code 1==
#include<iostream> using namespace std; int main() { cout<<"Hello World"; return 0; } ==code 2== #include <iostream> int main() { std::cout<<"Hello World"; return 0; }
Anonymous Quiz
5%
Code 1 only
16%
Code 2 only
17%
Both code 1 and code 2
62%
Neither code 1 nor code 2
By default, all the files in C++ are opened in _____ mode.
Anonymous Quiz
6%
ISCII
73%
Text
16%
Binary
5%
VTC
Which of the following correctly declares an array in C++?
Anonymous Quiz
7%
array{10};
6%
int array;
1%
array array[10];
85%
int array[10];
Which is more effective while calling the C++ functions?
Anonymous Quiz
7%
call by object
18%
call by pointer
60%
call by reference
15%
call by value
Which of the following is used to terminate the function prototype in C++?
Anonymous Quiz
8%
:
5%
]
62%
;
25%
)
What will be the output of the following C++ program? 
#include <iostream>
using namespace std;
int main(){
for(int i=1;i<=5 ;i++ ){
if(i==3){
continue;
}
cout << i << " ";
}
return 0;
}
1👍1
What will be the output of the following C++ program?
#include <iostream>
using namespace std; int main(){ for(int i=1;i<=5 ;i++ ){ if(i==3){ continue; } cout << i << " "; } return 0; }
Anonymous Quiz
17%
12345
9%
1234
72%
1245
2%
1235
What will be the output of the following C++ program? 
#include <iostream>
using namespace std;
void fun(int x,int y){
x=20;
y=10;
}
int main(){
int x=10;
fun(x,x);
cout << x << endl;
return 0;
}
What will be the output of the following C++ program?
#include <iostream>
using namespace std; void fun(int x,int y){ x=20; y=10; } int main(){ int x=10; fun(x,x); cout << x << endl; return 0; }
Anonymous Quiz
17%
20
72%
10
5%
30
7%
Error
What will be the output of the following C++ code?
#include <iostream>
using namespace std; int main() { char c = 73; cout << c; return 0; }
Anonymous Quiz
28%
J
13%
A
49%
I
10%
N
What will be the output of the following C++ program?
#include<iostream>
using namespace std; int main(){ int x = 5; auto a = x; x++; cout<<"Value of a: "<<a<<endl; return 0; }
Anonymous Quiz
6%
Segmentation fault
60%
Value of a: 5
7%
Error
27%
Value of a: 6
What will be the output of the following C++ program?
#include <iostream>
using namespace std; int main (){ int a, b, c; a = 2; b = 7; c = (a > b) ? a : b; cout << c; return 0; }
Anonymous Quiz
6%
12
18%
14
8%
6
68%
7
1
23 What will be output of the following program?
#include<iostream>
using namespace std; int main (){ int array[] = {0, 2, 4, 6, 7, 5, 3}; int x, result = 0; for (int i = 0; i < 8; i++) result += array[x]; cout << result; return 0; }
Anonymous Quiz
2%
25
40%
27
6%
26
52%
Compile time error
👍2
What will be the output of the following C++ program?

int i; enum month { JAN = 1, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC }; for (i = MAR; i <= NOV; i++) cout << i;
Anonymous Quiz
12%
01234567891011
14%
123456789101112
69%
34567891011
5%
123456789
What will be the output of the following C++ program?
#include <iostream>
using namespace std; enum test { A = 32, B, C }; int main() { cout << A << B<< C; return 0; }
Anonymous Quiz
18%
323232
7%
323130
6%
323134
69%
323334
What is the index number of the last element of an array with 9 elements?
Anonymous Quiz
8%
9
80%
8
4%
0
8%
Programmer-defined