Thursday 18 August 2011

technical section for hcl recruitment


          Technical Section
1    In ANSI C which is such thing is not in Java.
     typedef struct node
            {
             int
             NODEPTR * NODE
            }
2     Q. In signed magnitude notation what is the minimum value that can be represented with 8 bits
            a) -128 b) -255 c) -127 d) 0
3    Q. there is an employer table with key feilds as employer no. data in every n'th row are needed for a simple following
              queries will get required results.
          a)   select A employe no. from employe A , where exists from employe B where A employe no. = B employe
                 having (count(*) mod n)=0
         b)   select employe no. from employe A, employe B  where A employe no. = B employ no.
              grouply employe no. having (count(*) mod n=0 )
         c)  both a& b
        d)  none of the above
4.   Piggybacking is done for, Ans=>Acknowledgement.
5.  WHICH IS NOT BASIC data type ans.Char*
6.   which of the following statement is valid for string copy                                    
            char *srt,*ptr;
        a)   while(*str) {
               *str=*ptr;
                ++str=++ptr;
                   }
       b ) while(*str)
            {*++str=*++ptr};
       c)
7   Two variable cannt have the same name in
         a)function b) block c) file d)--- C Section
8    #define inc(x) x++
         main()
             {
               int t=1;
               printf("%d",inc(t++));
           }
9 .  one or two que for the complicated declaration.                                                       
10.   Const char *a="Abcd"; char const *a="lmno"; base do this,Two que were there.
11.   char *p ;
        char q[20];
12.    int i,*p=&i;
        p=malloc(10);
         free(p);
         printf("%d",p);
         ans : garbage
13.    int i=20,*j=&i
          f(i)
           printf("%d",i);
14.       #define val 1+2
           printf("%d%d",val/val,val^3)
           ans : 3 9
15.     #define "this" "#"
          #define (x,y) x##y
          printf("this","this is")
          ans: compilation error (tested)
16.       (2^2)+(a^a)
17.       int a ,b=7
            a=b<4?b<<1:b>4?7>>1:a                                                                             
            ans.3
18.       one que on c++ class member function
             ans.d
19.       work of memory management unit.
20.       who relate virtual memory to physical memory   ans.os
21.       memory is allocated to variable
             a)when declared b)when define c)...
22.      Question on double linked list
23.     Define success 1
           define failure -1
           if(condition)
           printf(success);
           else
              printf(failure);
                ans success
24  .  main()
             {
               int var=25,varp;
               varp=&var;
               varp=10;
               fun(varp);
               printf(%d%d",var,varp);
               ans a)45,45 b)55,55 c) 20,55;
25.     u r given two statements
           a=(10.15);
            b=10,15;
            if they are executed what is the output   printf("%d%d",a,b);                           
             a)10,15 b)15,10 c)10,10 d)15,15       ans a
26.    define null 0    ans=0;
27.     #define inc(x) x++
           main()
              {
                int t=1;
                printf("%d",inc(t++));
            }
             ans.error
28.  argument in funtion can be passed
           1)by value 2)by refference 3)....                                                                        
29.      main
            {int x=1,y=2,z=3;
            x=y==z;
            printf(x);
           }
30.   in switch float is not used
31.   one question on register variable.

No comments: