(.1)
(.1)
__________________________
__________________________
. , ( , , , , -, ). . . (.2)
5. (#ifdef... #endif) (.2)
. . (.2)
7. . 'a' a. (.2)
(8, 16, 10). (.2)
. (.2)
. 10- 16- . (.2)
11. . (.2)
12. (.2):
const int i = 17;
#define i 17
13. . ? (.2)
14. , (.2):
1. const int j = 17;
j = 29;
2. const int j (17);
3. const int i;
15. ? , . (.2)
__________________________
__________________________
(.3).
. (.3)
18. . . (.3).
. (.3)
20. (.3).
. (.3)
. (.3).
23. . . (.3).
.
24. . . (.3).
(.3)
26. (.3):
int cube(int y);
void main() {int x; for (x=1; x<=10; x++) cout<<cube(x)<<endl;}
int cube(int e){return e*e*e;}
27. , (.3):
int x = 11;
|
|
Void f4()
{
int y = x;
int x = 22;
y = x;
}
. (.3)
(.3)
int func()
{
static int a;
int static b;
int extern c;
extern int k;
extern static int d;
}
30. : (.3)
char ch;
char* name = "Njal";
struct complex { float re, im; };
complex cvar;
extern complex sqrt(complex);
extern int error_number;
typedef complex point;
float real(complex* p) { return p->re; };
const double pi = 3.1415926535897932385;
struct user;
template<class T> abs(T a) { return a<0? -a: a; }
enum beer { Carlsberg, Tuborg, Thor };
31. : (.3)
char ch;
char* name = "Njal";
struct complex { float re, im; };
complex cvar;
extern complex sqrt(complex);
extern int error_number;
typedef complex point;
float real(complex* p) { return p->re; };
const double pi = 3.1415926535897932385;
struct user;
template<class T> abs(T a) { return a<0? -a: a; }
enum beer { Carlsberg, Tuborg, Thor };
32. ? (.3)
33. , (.3):
1. int &i =2;
2. int count;
int count;
3. extern int error_number;
extern short error_number;
4. extern int error_number;
extern int error_number;
5. void f5 (int x)
{
int x;
}
34. ? (.3):
_________________________
. () (.4).
( ) (.4).
37. ! ~ & % (.4).
38. / << ^ (.4).
39. >> || && (.4).
40. ?, sizeof () (.4).
41. (.4):
char var = 0x1F & 9 >> 1 + 1;
42. ? (.4)
++ = fun(x);
x<<y;