-->



Honeywell Placement Paper


1. int *data[10];
what does the variable data denotes?

2.{
int a[]={10,20,30,40,50};
fun(a+1);
}
fun(int *p)
{
for(int i=1;i<=3;i++)
printf("%d",*(p+i));
}

3.enum day { saturday,
sunday=3,
monday,
tuesday
};
value of saturday,tuesday.

4.enum day {
saturday,
sunday=-1,
monday,
tuesday
};
int x=monday;
value of x?

5. #define ADD(X,Y) X+Y
main()
{
-
#undef ADD(X,Y)
fun();
}
fun()
{
int y=ADD(3,2);
printf("%d",y);
}
o/p?

6. #define ADD(X,Y) X+Y
main()
{

#undef ADD;
fun();
}
fun()
{
#if not defined(ADD)
define ADD(X+Y) X*Y

int y=ADD(3,2);
printf("%d",y);
}
o/p?

7. What is pointer ? Give an example

8. int x;
int *p;
int **p1;
int ***p2;
How to assign each one?

9. What is malloc