اللجنة العلمية_مستوى ثاني
964 subscribers
215 photos
20 videos
1.09K files
166 links
القنوات العلمية المركزية:
سنة اولى/ https://t.me/USF_Computer1
سنه ثانية/ https://t.me/USF_computer2
سنة ثالثة/ https://t.me/USF_Computer3
سنة رابعة/ https://t.me/USF_Computer4

تم ارشفة اغلب قنوات ومجموعات الدفع السابقة ، وهي مثبته
Download Telegram
Forwarded from IS AM 2022 (M.almamari)
To add the output at the end of an existing file, you can use the option:
Anonymous Quiz
57%
A. ios::app
4%
B. ios::in
34%
C. ios::out
5%
D. ios::ate
Forwarded from IS AM 2022 (M.almamari)
The following program fragment __________.
#include <iostream>
using namespace std; main() { int x = 20; int *p = &x; *p=40; cout<<p<< &x; }
Anonymous Quiz
36%
A. prints 40 and the address of x.
25%
B. results in a runtime error.
32%
C. prints the address of x twice.
6%
D. prints the address of p twice.
Forwarded from IS AM 2022 (M.almamari)
The following program __________.
#include <iostream>
using namespace std; void abc(int &p) { cout << p; } main() { float m = 1.23; abc(m); }
Anonymous Quiz
29%
A. results in a compilation error
16%
B. results in a run time error
39%
C. prints 1.23
15%
D. prints 1
Forwarded from IS AM 2022 (M.almamari)
What is the output of the following C++ program?
#include <iostream>
using namespace std; main() { int a[] ={10,20,30}; int *p=&a[0]; p++; cout << *p+1; }
Anonymous Quiz
9%
10
17%
20
51%
11
23%
21
Forwarded from IS AM 2022 (M.almamari)
What is the output of the following C++ code?

int num1; int num2; int *p = &num1; p = &num2; *p = 25; num1 =num2+ 6; p = &num1; num2 = 73; *p = 47; cout << *p << " " << num1 << " " << num2 << endl;
Anonymous Quiz
27%
A. 47 47 73
33%
B. 47 47 47
18%
C. 47 31 25
21%
D. None of above
Forwarded from اللجنة العلمية CS 22 (Ayham Alakhlly)
#include <iostream>
#include <string>
using namespace std; int main(int argc, char const *argv[]) { char s1[6] = "Hello"; char s2[6] = "World"; char s3[12] = s1 + " " + s2; cout<<s3; return 0; }
Anonymous Quiz
2%
Hello
5%
World
57%
Error
36%
Hello World
Forwarded from اللجنة العلمية CS 22 (Ayham Alakhlly)
#include <iostream>

#include <string> #include <algorithm> using namespace std; int main() { string s = "spaces in text"; s.erase(remove(s.begin(), s.end(), ' ' ), s.end() ) ; cout << s << endl; }
Anonymous Quiz
44%
spacesintext
29%
spaces in text
20%
spaces " "
8%
spaces in
Forwarded from اللجنة العلمية CS 22 (Ayham Alakhlly)
Which of the following is a correct identifier in C++?
Anonymous Quiz
80%
VAR_1234
10%
$var_name
7%
7VARNAME
3%
7var_name
Forwarded from اللجنة العلمية CS 22 (Ayham Alakhlly)
#include<iostream.h>
int main()
{ int x = 80; int y& = x; x++; cout << x << " " << --y; return 0; }
Anonymous Quiz
10%
80 80
46%
81 80
6%
81 81
39%
Error
Forwarded from اللجنة العلمية CS 22 (Ayham Alakhlly)
#include<iostream>
using namespace std;
enum Ayham { a = 1, b, c }; int main() { int x = c; int& y = x; int& z = x; y = b; cout << z--; return 0; }
Anonymous Quiz
5%
1
16%
2
15%
3
37%
Error
1%
z—
27%
logical Error
Forwarded from اللجنة العلمية CS 22 (Ayham Alakhlly)
#include<iostream>
int main()
{ int x = 10, y = 20; int* ptr = &x; int& ref = y; *ptr++; ref++; std::cout << x << " " << y; return 0; }
Anonymous Quiz
18%
10 20
22%
10 21
16%
11 20
29%
11 21
14%
Error
Forwarded from اللجنة العلمية CS 22 (Ayham Alakhlly)
#include<iostream>
int main()
{ int x = 100, y = 200; int* Ayham_s_ptr = &x; int& ref = y; (*Ayham_s_ptr)++; ref++; std::cout << x << " " << y; return 0; }
Anonymous Quiz
4%
100 200
6%
101 200
32%
100 201
35%
101 201
15%
Error
7%
All of them //Brah
Forwarded from اللجنة العلمية CS 22 (Ayham Alakhlly)
#include<iostream.h>
int main()
{ int x = 0; int &y = x; y = 5; while(x <= 5) { cout<< y++ << " "; x++; } cout<< x; return 0; }
Anonymous Quiz
8%
5 6 7 8 9 10
12%
5 6 7 8 9 10 7
28%
5 7
16%
5 5
23%
Error
9%
All of them // definitely Brah
4%
7 7
Forwarded from اللجنة العلمية CS 22 (Ayham Alakhlly)
#include<iostream>
using namespace std;
int main() { int m = 2, n = 6; int& x = m; int& y = n; m = x++; x = m++; n = y++; y = n++; cout << m << " " << n; return 0; }
Anonymous Quiz
18%
2 6
63%
4 8
11%
6 10
8%
Error
Forwarded from اللجنة العلمية CS 22 (Ayham Alakhlly)
#include<iostream>
using namespace std;
struct Ayham { Ayham(int& x, int& y) { x++; y++; } }; int main() { int a = 10, b = 20; Ayham cs50(a, b); cout << a << " " << b; return 0; }
Anonymous Quiz
34%
11 21
14%
10 20
36%
Error
16%
0000004D0055F964 0000004D2355F793
Forwarded from اللجنة العلمية CS 22 (Ayham Alakhlly)
#include<iostream>
enum Ayham
{ a, b, c }; int main() { int x = a, y = b, z = c; int& p = x, & q = y, & r = z; p = ++x; q = ++y; r = ++c; std::cout << p << q << r; return 0;
Anonymous Quiz
33%
123
18%
234
13%
431
5%
021
30%
Error
Forwarded from اللجنة العلمية CS 22 (Ayham Alakhlly)
#include<iostream>
int main()
{ int gojo[] = { 1, 2 ,3, 4, 5 }; int& sukuna = gojo; for (int i = 0; i <= 4; i++) { gojo[i] += gojo[i]; } for (int i = 0; i <= 4; i++) std::cout << sukuna[i]; return 0; }
Anonymous Quiz
15%
1 2 3 4 5
27%
2 4 6 8 10
14%
1 1 1 1 1
44%
Error
Forwarded from اللجنة العلمية CS 22 (Ayham Alakhlly)
#include<iostream>
struct hisoka
{ short n; }; int main() { hisoka gon; hisoka& killua = gon; gon.n = 10; std::cout << gon.n << " " << killua.n << " "; killua.n = 20; std::cout << gon.n << " " << killua.n; return 0; }
Anonymous Quiz
45%
10 10 20 20
14%
20 20 20 20
16%
10 10 10 10
23%
Error
2%
All of them :)
Forwarded from اللجنة العلمية CS 22 (Ayham Alakhlly)
#include <iostream>
using namespace std;
enum study_for_yourmom { a, b, c }; int main() { int x = a, y = b, z = c; int& p = x, & q = y, & r = z; p = z; p = ++q; q = ++p; z = ++q + p++; cout << p << " " << q << " " << z; }
Anonymous Quiz
18%
2 3 6
36%
4 4 7
20%
4 4 8
25%
Error
Forwarded from اللجنة العلمية CS 22 (Ayham Alakhlly)
#include<iostream>
using namespace std;
int Ayham(int s) { s *= s; return((10) * (s /= s)); } int main() { int c = 9, * d = &c, e; int& z = e; e = Ayham(c-- % 3 ? ++ * d : (*d *= *d)); z = z + e / 10; cout << c << " " << e; }
Anonymous Quiz
7%
64 9
25%
64 10
19%
64 11
21%
Error
Forwarded from اللجنة العلمية CS 22 (Ayham Alakhlly)
#include<iostream>
struct Ayham
{ int x, y; void cs(int& xx, int& yy) { x = xx++; y = yy; std::cout << xx << " " << yy; } }; int main() { int x = 10; int& y = x; Ayham cs; cs.cs(x, y); }
Anonymous Quiz
21%
10 10
26%
10 11
30%
11 10
23%
11 11