Question 120 - 140

1
#include<stdio.h>
#define PRINT(int)  printf("%d\n",int)
main()
{
	auto int i=1;
	PRINT(i);
	{
		int i=2;
		PRINT(i);
		{
			PRINT(i);
			int i=10;
			i+=1;
			PRINT(i);
		}
		PRINT(i);
	}
	PRINT(i);
}


2
#include<stdio.h>
main()
{
	char  a[2];
	char b=65;
	a[0]=b;
	a[1]=b++;
	a[2]='\0';
	puts(a);
}


3
#include<stdio.h>
#define PRINTX printf("%d\n",x)
main()
{
   int  x=2,y,z;
    x*=3 + 2; PRINTX;
    x*= y = z = 4; PRINTX;
    x = y == z; PRINTX;
    x == ( y = z ); PRINTX;
}


4
#include<stdio.h>

int instr(char *str,char o)
{
	int i=0;
	while(i<strlen(str))
	{
		if(str[i] == o)
			break;
		else
	}
	if(i<strlen(str))
		return i+1;
	else
		return -1;
}
main()
{
	char *a= "hello world";
	printf("\n%d",instr(a,'l'));
}


5
#include<stdio.h>
main()
{
	char a= 'A';
	if( (a=='Z')||( (a='L')&&( a=='A')))
		a='M';
	printf("%c",a);
	printf(" Nothing ");
}