-->



HP Placement Paper


1)Which of the following can be used to print % to the screen
a) printf("\%");b)printf("%%");

2)how many times the loop is executed
main()
{
int i=3;
while(i>=0)
printf("%d",i--);
return(0);
}
a) 3 b)Infinite c)0 d)2

3) what is the output
int 1=10;
printf("%d %d %d ",i,++i,i++);
a) 10 11 11 b)11 11 10 c) 10 11 10 d) None of the above

4)x=2;
y=5;
z=x+++y;
printf("%d %d %d",x,y,z);

5) Void xyz(char a[10])
{
int i;
i=sizeof(a);
printf("%d",i);
}
a)10 b)can't say c) 2 d)same as size of pointer.

6) Local Variables is stored in which part of the memory
a) register or heap b)heap c)register or stack
7) which of the following can be shared by programs
1)Text Code
2)Data segment
3)heap memory