Suppose that an integer variable m contains the value 90 ie
Solution
Solution1.c
#include <stdio.h>//header file for inupt output function
int main()
{//main function
int n=90;//%d%% prints 90%
printf(\"%d%% usually means a %cA%c \",n,\'\"\',\'\"\');
return 0;//%cA%c Prints \"A\"
}
output
90% usually means a \"A\"
Solution2.c
#include <stdio.h>//header file for inupt output function
int main()
{//main function
int k;
printf(\"enter the k value :\");
k=getchar();//keyboard inputting
printf(\"%d\ \",k);//ascii value of 3 is 51
return 0;
}
output
enter the k value :3
51
Solution3.c
#include <stdio.h>//header file for inupt output function
int main()
{//mainfunction
int x,y,z;//variable declaration
float a,b;
a=2.5,b=3.14;
x=3; y=5.3; z=2;
x+=y+a*z-b;//variable assigmnets
z+=(x==y);
x==(a=b);
printf(\"x=%dy=%dz=%d\ \",x,y,z);
printf(\"x=%d\ \",x);
printf(\"z=%d\ \",z);
printf(\"x=%d\ \",x);
return 0;//%cA%c
}
output
x=9y=5z=2
x=9
z=2
x=9

