Lifetree - Technical Placement Paper

Lifetree - Technical Placement Paper


1. Explain:
char *const ptr;
char const *ptr;
similar to this // Its pointer to constant and conastant pointer

2. int x;
int modify(int x)
{
return(x+=10);
}
int changevalue(int x)
{
return(x+=1);
}
void main()
{
int x=10;
x++;
modify(x);
x++;
printf("%d",x);
x++;
changevalue(x);
x++;
modify(x);
printf("%d",x);
}

What is the output?

3. main()
{
int x=10,y=15;
x= x++;
y= y++;
printf("%d%d",x,y);
}
What is the output?

4. int a;
if(a==0)printf("XYZ");
printf("XYZ");
What is the output?

5. void main()
{
char *ptr= "xyz";
*ptr++;
printf("%d\n", ptr);
ptr++;
printf("%d", ptr);
}

6. The C language terminator is

(a) semicolon
(b) colon
(c) period
(d) exclamation mark

7. Find the value of y in the following code?
x=7;
y=0;
if(x=6) y=7;
else y=1;

(a) 7
(b) 0
(c) 1
(d) 6

8. A compound statement is
(a) A set of simple statments
(b) Demarcated on either side by curly brackets
(c) Can be used in place of simple statement
(d) A C function is not a compound statement.

9. How will C compiler interpret the following two statements:
p=p+x;
q=q+y;
(a) p=p+x;
q=q+y
(b)p=p+xq=q+y
(c)p=p+xq;
q=q+y
(d)p=p+x/q=q+y

10. The operator for exponencation is

(a) **
(b) ^
(c) %
(d) not available

11. a=0;
while(a<5)
printf("%d\n",a++);
How many times does the loop occurs?
(a)infinite
(b)5
(c)4
(d)6

12. Pick out the add one out
(a) malloc()
(b) calloc()
(c) free()
(d) realloc()

13. Int *a[5] refers to

(a) array of pointers
(b) pointer to an array
(c) pointerto a pointer
(d) none of these

14. After a small network outage, Aman’s monitoring system alerts him that a significant number of SMTP queues on his Hub Transport server is coming in a retry status. Aman requires to force the Hub Transport server to send the queued e-mail immediately. Which cmdlet should Aman run?

A. Retry-queuE.filter {status - eq ?retry?)
B. Retry-queuE.filter (status - eq ?suspended?)
C. Resume-queuE.filter (status - eq ?retry?)
D. Resume-queuE.filter (status - eq ?suspended?)
Post your comment