# EasyTech Placement Question Paper_26

EasyTech Placement Question Paper_26.

1)
main()
{
char a[2];
*a[0]=7;
*a[1]=5;
printf(“%d”, &a[1]-a)
ans may be 1.(illegal initialization)

2)
#include
main(){
char a[]=”hellow”;
char *b=”hellow”;
char c[5]=”hellow”;
printf(“%s %s %s “,a,b,c);
printf(” “,sizeof(a),sizeof(b),sizeof(c));
}
Ans:is hellow,hellow,hellow
6,2,5 )
3)
#include
main()
float value=10.00;
printf(“%g %0.2g %0.4g %f”,value,value,value,value)
}
Ans:is 10,10,10,10.000000)
4)
#include
void function1;
int i-value=100;
main()
{
i-value=50;
function1;
printf(“i-value in the function=”,i-value);
printf(“i-value after the function=”,i-value);
}
printf(“i-value at the end of main=”,i-value);
functioni()
i-value=25;

5)
main()
{
funct(int n);
{
switch(n)
case1:
m=2;
break;
case2:
m=5;
break;
case3:
m=7;
break;
default:
m=0;
}
WRITE THE OUTPUT FOR FOLLOWING PROGRAMS.
1) printf(“%d%xn”,ox2,12);
2) int a=10;
int b=20;
a=a^b;
b=a^b;
a=a^b;
printf(“%d%dn”,a,b);
3)enum
{ELLIPSE,
TRIANGLE,
RECTANGLE,
SQUARE=100,
CIRCLE=5
}
printf{“%d%d%d%dn”,TRIANGLE-RECTANGLE,SQUARE*CIRCLE-RECTANGLE};
4) define the following…
a) pointer to a integer
b) pointer to a char
c) function pointer returning a pointer integer.

5) void a(void);
main()
{
a();
}
void a(void)
{
char a=”HELLOW”;
char *b=”HELLOW”;
char c[10]=”HELLOW”;
printf(“%s%s%sn”,a,b,c);
printf(“%d%d%dn”,sizeof(a),sizeof(b),sizeof(c)));
}
6) int a=15;
int b=16;
printf(“%d %d n”,a&b,a/b); (bitwise operators)
7) int a[5],*p;
for(p=a;p<&a[5];p++)
{
*p=p-a;
printf(“%dn”,*p);
}

8) sscanf(“xyz abc ABC 345” “% *[a-z A-Z]lf”,&a);
printf(“lf”,a);

9) Not clear
fprintf(- – – – –

10) main()
{
int i=10;
printf(“%d”,i);
{
int i=20;
printf(“%d”,i);
}
printf(“%d”,i);
}

11)struct class
{
int i;
float a;
string[12];
}
sizeof(class)=?
12) int *p;
i=10;
p=i;
printf(“%d”,*p);

13) fact(5)
int n;
fact(n)
{
sum=n*fact(n-1);
}
NEXT FINITE ELEMENT ANALYSYS QUESTIONS