Caritor  Placement Paper   Aptitude - General   Not Specified-28 Nov 2005

Caritor  Placement Paper   Aptitude - General   Not Specified-28 Nov 2005


  • Posted by  FreshersWorld 
    7 Jan, 2012

     

    Sample Test 

    Pattern Consist of 

    • Quantities

    • C/C++

    • GD

    • Interview

     Quantitative Section   

    1. A fraction in which nr. is 4 less than dr.When 10 is added to the dr the fraction  becomes 1/8.What is the original fraction?
      Ans:
              Let nr be x
              dr be x+4
              fraction x/x+4
              on adding 10 to dr
              fraction==> x/x+14=1/8 ==> x=2
              Original fraction=2/6

        Complete the Series


    2.   1.
                

      2.
           


    3.  Synonyms:
           final (---------- ) ultimate
          a)  end   b)  last   c)finish   d)  dead

    4. Synonyms:
      nice ( -------- ) punish

    5. Data Representation both graph ,pie chart

    6. Time & work problem

    7. Verbal Reasoning 3 or 4 problems

           C  Questions

    8. main()
        {
           char s[]={?1?,?2?,?3?,0,?1?,?2?,?3?};
           printf(?%s?,s);
        }

        a)123 123 
        b)123123
        c)1230123
        d)error

    9. main()
         {
           char *p=?Caritor?;
           *++p;
           printf(?%s?,p);
           *++p;
           printf(?%s?,*p);
        }
      Ans: aritor ritor

    10. main()
      {
         int K,j;
         for(k=0;k<10;k++)
          {
             some codes
            }
        }
      Ans : ERROR since k not declared

    11. How to print ?%? symbol in printf?
        Ans: 
         printf(?\%?);

    12. What is the max no of char in command line arguments?

    13. Can arithmetic Operation be performed on void pointers?

    14. main()
        {
          char str1[]=?HELLO?;
          char str2[]=?HELLO?;
          if(str1==str2)
             printf(?EQUAL?);
          else
             printf(?NOT EQUAL?);
        }
      Ans: NOT EQUAL    ,Since string can be compared only using strcmp()

    15. main(int argc)
        {
           int a;
           printf(?%d?,a);
        }

    16. How to declare argc and argv
      ans: main(int argc,char* argv[])

    17. main()
      {
         int s=5;
         printf(?%d?,s,s<<2,s>>2);
      }
      ans:5 20 1

    18. main()
      {
          int a[2][2]={2,3}
          printf(?%d%d%d%d?,a[0][0],a[0][1],a[1][0],a[1][1]};
      }
        a)2000
        b)0002
        c)2300
        d)error
          ans: 2300

    19. main
       {
         int a[5]={2,3};
         printf(?%d%d%d?,a[2],a[3],a[4]);
        }

    20. extern int I;   is it a declaration or definition?

    21. main()
          {
           int i=-3,j=2,k=0,m;
           m= ++j&&++i||++k;
           printf(?%d%d%d?,i,j,k,m);
          }

    22. main()
           {
          int i=-3,j=2,k=0,m;
          m= ++j&&++i&&++k;
          printf(?%d%d%d?,i,j,k,m);
             }

    23. main()
         {
          const int i=7;
           printf(?%d?,++i);
         }

    24. #define I 6
      main()
        {
          printf(?%d?,++I);
         }

    25. f array begins at position 1002
      main()
         {
         int a[2][3][4]={{1,2,3,4,5,6,7,8,9,1,1,2},{2,3,4,7,6,7,8,9,0,0,0,0}};
         printf(?%d%d%d%d?,a,*a,**a,***a);
         }

    26. main()
      {
      printf(?%c?,7[?sundaram?]);
      }

    27. struct name
        {
          int a;
          char b;
          char n;
          short s;
         }n1;
       main()
         {
      printf(?%d?,sizeof(n1));

         }

    28.   main()
          {
           enum{ m=2,n,o=60,p};
           printf(?%d?,p);
          }

    29. If A file contains the line ?I am a boy\r\n? then on reading this line into the array str using fgets() 
      What would str contain?

    30. In command line enter myprog 1 2 3 what is output?
      main(int argc , char * argv[])
        {
         int I,j=0;
         for(i=0;i    j=j+atoi(argv[i]);
         printf(%d?,j);
        }

    31. In command line enter myprog Friday Tuesday Thursday what is output?
      main(int argc , char * argv[])
      {
      printf(?%c?,**++argv):
      }

    32. 14>
      main()
        {
          printf(?%d?,-1>>4);
         }

2009-2016 downloadmela.com. All rights reserved.