Citrix Written Test Questions-1

1. What is the output of this statement ?
Printf(“%d”,printf(“%d %d”,2,2) & printf(“%d %d ”, 2, 2));
a. 22222
b. 22221
c. It will give an error during compilation

2. What is the output of this code snippet

main()
{ int *p[10];
printf("%d %d\n",sizeof(*p),sizeof(p));
}

3. Function inlining is best used when
a. In a small recursive function
b. In large function where number of variables used is small
c. In a large function where there are many loops and number of variables used is small
d. None of these

4. If there is a large quantum in round robin it will be equivalent to
a. First come first serve
b. Shortest job first
c. Least recently used
d. None of these

5 . which of the following will lead to starvation
a. Fifo
b. Shortest job first
c. Round robin
d. Least recently used

6 . if the address space is 192.168.36.16/28 which of the following is the broadcast ip
a. 192.168.36.0
b. 192.168.36.1
c. 192.168.36.255
d. 192.168.36.31

7. if there are 9 yellow balls, 3 red balls and 2 green balls. What is the probability that the second ball picked is yellow given the first ball is yellow
a. 8/13
b. 9/13
c. 8/14
d. 9/14

8. How many processes are created in this snippet?
Main()
{
Fork();
Fork() && fork () || fork ();
Fork ();
}

a. 15
b. 19
c. 21
d. 27
e. 31

9. which of the following is TRUE about the declaration const char * p
a. the pointer cannot be changed but the value to which it points can be changed
b. the value is constant but the pointer can be changed
c. neither the value nor the pointer can be changed
d. none of these

10. If F and L are the pointers to the first and last elements in a linked list, then which of the following operations is dependent on the length of the list?
a. delete the first element in the list
b. insert a new element as a first element
c. delete the last element of the list
d. add a new element at the end of the list