			PRELIM2
1: For the following assignment to be free of errors, what should be hello?
	int(*x)(int(*y)(int*)) = 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 ;
	min(a,b) = max(a,b) ;
	printf("%d,%d",a,b) ;
}
*****************************************************
3.void main(){
	for(unsigned char i=0xff;i>0x00;i=~-i)
		printf("%X",i) ;
}

4.void main(){
	for(int i= 10,j=1;i>0;j++,i-=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=1):i(i){}
	void operator=(Int I){ i = I.i ; }
	friend void main() ;
};
void main(){
	Int i(-1),j,k(0) ;
	i = j = k ;
	printf("%d",i.i) ;
} ;
*****************************************************
7.void print(char *p){
	if(*p)
	{
		printf("%c",*p-1) ;
		print(p-1) ;
	}
}
void main(){
	char ujto[]="\0ujto" ;
	print(ujto+4) ;
}
*****************************************************
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 ;
	x = y ;
}
*****************************************************
9.void main(){
	int i , j ;
	i=i--/i--;
	j=i--*i--;
	printf("%d%d",j,i) ;
}
*****************************************************
10.void main(){
	printf("%d",printf("%d",(1,-1))+printf("%d",1,-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\"s\"" ;
	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=0xa,b=010,c=12,d=1 ;
	clrscr() ;
	printf("%X,%o",a&b,c^d) ;
	getch() ;
}
*****************************************************





