			PRELIM1
1. For the following assignment to be free of errors, what should be hello?
	void(*x)(void(*y)(void)) = hello ;
*****************************************************
2.int& min(int& a , int& b){
	return a>b?a:b;
}
int& max(int& a , int& b){
	return a<b?a:b;
}
void main(){
	int a=-1,b=1 ;
	max(b,a) = min(b,a) ;
	printf("%d,%d",a,b) ;
}
*****************************************************
3.void main(){
	for(unsigned char i=0x00;i<0xff;i=-~i)
		printf("%X",i) ;
}
*****************************************************
4.void main(){
	for(int i= 0,j=1;i<10;i+=j,j++)
		printf("%x",i) ;
}
*****************************************************
5.class F{
	int f ;
public:
	F& f1() { f=1;return *this; }
	F f2() { f=2;return *this; }
	F f3() { f=3;return *this; }
	int getf(){ return f ; }
};
void main(){
	F f ;
	F g = f.f1().f2().f3() ;
	printf("%d%d",f.getf(),g.getf()) ;
} ;
*****************************************************
6.class Int{
	int i ;
public:
	Int(int i=0):i(i){}
	void operator=(Int I){ i = I.i ; }
	friend void main() ;
};
void main(){
	Int i(1),j(-1),k ;
	i = j = k ;
	printf("%d",i.i) ;
} ;
*****************************************************
7.void print(char *p){
	if(*p)
	{
		print(p+1) ;
		printf("%c",*p-1) ;
	}
}
void main(){
	char pmmfi[]="pmmfi\0" ;
	print(pmmfi) ;
}
*****************************************************
8.class I{
public:
	I(){ printf("c") ; }
	I(I &i){ printf("cc") ; }
	void operator=(I i){printf("a") ; }
	~I(){ printf("d") ; }
};
void main(){
	I x,y ;
	x = y ;
}
*****************************************************
9.void main(){
	int i , j ;
	i=i---i--;
	j=i---i--;
	printf("%d%d",j-i,i+j) ;
}
*****************************************************
10.void main(){
	printf("%d",(printf("%d",1),printf("%d",-1))) ;
}
*****************************************************
11.# define xx(x) x+x
# define xxx(x) xx(x)*xx(x)*xx(x)
void main(){
	int x = 1 ;
	printf("%d",xxx(xx(x))) ;
}
*****************************************************
12.class A{
	int a ;
public:
	A(int a=0){ this->a = a ; }
	A& operator++(){ a++ ; return *this ;}
	A& operator=(A& b){ this->a = b.a ; return b ;}
	friend void main() ;
};
void main(){
	A a, b(2);
	++(b = ++a) ;
	printf("%d%d",a.a,b.a) ;
}
*****************************************************
13.void main(){
	char s[]="hello",*p=s ;
	printf("%c%c%c%c%d",++*--p,--*p,(*p)++,*++p,sizeof(*s)+sizeof(&s)) ;
}
*****************************************************
14.void main(){
	char s[] = "\"\"ss\"" ;
	clrscr() ;
	printf("%%%s%%s\",s,\"s",s) ;
	getch() ;
}
*****************************************************
15.void main(){
	int  a,b,c,d,e,f ;
	a = b = c = d = e = f = 1 ;
	clrscr() ;
	a^=b|=c&=d>>=e<<=f ;
	printf("%d%d%d%d%d%d",a,b,c,d,e,f) ;
	getch() ;
}
*****************************************************
16.void main(){
	int a=0x10,b=010,c=10,d=2 ;
	clrscr() ;
	printf("%X,%o",a|b,c^d) ;
	getch() ;
}















