Practise Technical Test 1(For Citrix R&d)

13 Questions | Total Attempts: 127

SettingsSettingsSettings
Please wait...
Practise Technical Test 1(For Citrix R&d)

C Programming Interview Prep for Citrix, OS, Aptitude


Questions and Answers
  • 1. 
    Print the elements of linked list in reverse order without using another linked list or data structures?
  • 2. 
    #define square(x) x*x void main() {          int i;          i = 64/square(4);                   printf("%d",i); }
    • A. 

      4

    • B. 

      64

    • C. 

      16

    • D. 

      32

  • 3. 
    Int fact(int N) {              return (N * fact(N-1));       }   void main() {            int N=5;      int factorial = fact(N);       printf(“%d”,factorial); }  
    • A. 

      Compiler Error

    • B. 

      Stack overflow

    • C. 

      120

    • D. 

      -120

  • 4. 
    What is the output of this statement ? (Question asked in Citrix) printf(“%d”,printf(“%d%d”,2,2) & printf(“%d%d ”, 2, 2));
    • A. 

      22222

    • B. 

      22221

    • C. 

      22223

    • D. 

      Compiler Error

  • 5. 
    #include<stdio.h> int main() {          int *p[10];          printf(“%d %d”,sizeof(p),sizeof(*p));          return 0; }
    • A. 

      40 4

    • B. 

      80 8

    • C. 

      4 4

    • D. 

      Depends on Compiler

  • 6. 
    If there is a large quantum in round robin scheduling method, it will be equivalent to
    • A. 

      First Come First Serve

    • B. 

      Least Recently Used

    • C. 

      Shortest Job First

    • D. 

      None of the above

  • 7. 
    Which among the following scheduling policies will lead to starvation of processes?
    • A. 

      Round Robin Policy

    • B. 

      Shortest Job First

    • C. 

      Least Recently Used

    • D. 

      First in First Out

  • 8. 
    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

  • 9. 
    #include<stdio.h> struct ABC {     int a;     char b; }abc; int main() {    printf("sizeof structure:%d",sizeof(abc));    return 0; } 
    • A. 

      5

    • B. 

      4

    • C. 

      8

    • D. 

      6

  • 10. 
    #include<stdio.h> int main() {          if(sizeof(int)>-1)                   printf(“TRUE”);          else                   printf(“FALSE”);          return 0; }
    • A. 

      TRUE

    • B. 

      FALSE

  • 11. 
    #include<stdio.h> void main() {     int a =10;     void *k;     k =&a;     k++;      printf(“%d”,k); }
    • A. 

      Compiler Error

    • B. 

      Some garbage value

    • C. 

      Some pointer value

    • D. 

      1

  • 12. 
    Void main() { static int a = 5; printf(“%d”, a--); if (a) main(); }
    • A. 

      5 4 3 2 1

    • B. 

      5 4 3 2 1 0

    • C. 

      5 5 5 5 5…Infinite

    • D. 

      4 3 2 1 0

  • 13. 
    Void main()  (Assume int to be of 2 bytes) {        unsigned int i= 3;        while(i-- >=0)                   printf(“%u”,i);  }
    • A. 

      3 2 1 0 65535 65534 …..3 2 1 0 ….

    • B. 

      3 2 1 0

    • C. 

      3 2 1

Back to Top Back to top