Saturday, 23 August 2014

programming's and data structure

1. what is the output of the following program?
   main()
   {
    extern int i;
    i=0;
    printf("%d",size of(i));
    }
   (a) 2         (b) 4
   (c) would vary from compilar to compilar
   (c) Error,i undefind
2. what is the output of the following program?
   main()
   {
    extern int a;
    i=0;
    printf("\n%d",a);
    }
     int a=20;
   (a) 0         (b) 20
   (c) Error     (c) Garbage value
3. what is the output of the following program?
   main()
   {
    int a[5]={2,3};
 
    printf("\n%d%d%d",a[2],a[3],a[4]);
    }
   (a) Garbge values         (b) 233
   (c) 322                   (c) 000
4. what is the output of the following program?
   main()
   {
    struct emp;
     {
       char name[20];
       int age;
       flot sal;
      };
      struct emp e={"Tiger"};
      printf("\n%d%f",e.age,e.sal);
    }
   (a) Error         (b) Garbge values
   (c) 0.000000      (c) 10.000000
5. in the following 'C' code, in which order the functions wpuld be called?
      a=f1(23,14)*f2(12/4)+f3();
    (a) f1,f2,f3    
    (a) f3,f2,f1
    (c) The order may varr from comfilar to compilar
    (d) None of these 

No comments:

Post a Comment