-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathntest.cpp
More file actions
54 lines (37 loc) · 957 Bytes
/
ntest.cpp
File metadata and controls
54 lines (37 loc) · 957 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include <iostream>
class PrintTest{
public:
PrintTest(){
std::cout << "PrintTest is initialized..\n";
}
~PrintTest(){
std::cout << "PrintTest is destroyed..\n";
}
};
static PrintTest printtestObject;
int main(){
std::cout << "main sttarted\n";
{
PrintTest anotherprintObj;
}
std::cout << "25 % 3 = " << 25 % 3 << '\n';
std::cout << "25 / 3 = " << 25 / 3 << '\n';
auto a = 25 | 3;
std::cout << "25 | 3 = " << a << '\n';
auto b = 25 & 3;
std::cout << "25 & 3 = " << b << '\n';
auto c = 25 && 3;
std::cout << "25 && 3 = " << c << '\n';
auto d = 25 || 3;
std::cout << "25 || 3 = " << d << '\n';
auto e = 25 ^ 3;
std::cout << "25 ^ 3 = " << e << '\n';
auto f = ~25;
std::cout << "~25 = " << f << '\n';
std::cout << "main endinglll\n";
const int val1 = 100; // cannot assign to variable 'val1' with const-qualified type 'const int'
val1 = 101;
const char *ptr1 = "abc";
p
return 0;
}