-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstring.cpp
More file actions
34 lines (28 loc) · 717 Bytes
/
Copy pathstring.cpp
File metadata and controls
34 lines (28 loc) · 717 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
#include<bits/stdc++.h>
using namespace std;
int main() {
char a[5] = {65,97};
// for (int i = 0; a[i] != '\0'; i++) {
// printf("%c ", a[i]);
// printf("%d ", a[i]);
// }
char b[5] = {'J', 'O', 'H', 'N', '\0'};
// printf("%s ", b);
char ca[] = "radioactive";
for (int i = 0; ca[i] != '\0'; i++) {
ca[i] -= 32;
}
// cout << ca;
char ao[] = "radio";
char oa[] = "radio";
if (oa == ao) {
cout << "true" << endl;
} else {
cout << "false" << endl;
}
int i = 65124566;
int *j = &i;
char *pc = (char *)j;
cout << pc + 3; // prints the whole remaining string instead of an address.
return 0;
}