CARITOR Placement Papers
Caritor Sample Test Paper
Pattern Consist of
- Quantities
- C/C++
- GD
- Interview
Quantitative Section
- 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
1.
- 2.
|
- Synonyms:
final (---------- ) ultimate
a) end b) last c)finish d) dead
- Synonyms:
nice ( -------- ) punish
- Data Representation both graph ,pie chart
- Time & work problem
- Verbal Reasoning 3 or 4 problems
C Questions
- main()
{
char s[]={1,2,3,0,1,2,3};
printf(%s,s);
}
a)123 123
b)123123
c)1230123
d)error
- main()
{
char *p=Caritor;
*++p;
printf(%s,p);
*++p;
printf(%s,*p);
}
Ans: aritor ritor
- main()
{
int K,j;
for(k=0;k<10;k++)
{
some codes
}
}
Ans : ERROR since k not declared
- How to print % symbol in printf?
Ans:
printf(\%);
- What is the max no of char in command line
arguments?
- Can arithmetic Operation be performed on void
pointers?
- 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()
- main(int argc)
{
int a;
printf(%d,a);
}
- How to declare argc and argv
ans: main(int argc,char* argv[])
- main()
{
int s=5;
printf(%d,s,s<<2,s>>2);
}
ans:5 20 1
- 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
- main
{
int a[5]={2,3};
printf(%d%d%d,a[2],a[3],a[4]);
}
- extern int I; is it a declaration or definition?
- main()
{
int i=-3,j=2,k=0,m;
m= ++j&&++i||++k;
printf(%d%d%d,i,j,k,m);
}
- main()
{
int i=-3,j=2,k=0,m;
m= ++j&&++i&&++k;
printf(%d%d%d,i,j,k,m);
}
- main()
{
const int i=7;
printf(%d,++i);
}
- #define I 6
main()
{
printf(%d,++I);
}
- 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);
}
- main()
{
printf(%c,7[sundaram]);
}
- struct name
{
int a;
char b;
char n;
short s;
}n1;
main()
{
printf(%d,sizeof(n1));
}
- main()
{
enum{ m=2,n,o=60,p};
printf(%d,p);
}
- 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?
- In command line enter myprog 1 2 3 what is output?
main(int argc , char * argv[])
{
int I,j=0;
for(i=0;i<argc;i++)
j=j+atoi(argv[i]);
printf(%d,j);
}
- In command line enter myprog Friday Tuesday Thursday
what is output?
main(int argc , char * argv[])
{
printf(%c,**++argv):
}
- 14>
main()
{
printf(%d,-1>>4);
}
|