GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  Caritor
Go To First  |  Previous Question  |  Next Question 
 Caritor  |  Question 2 of 15    Print  
Caritor Campus Recruitment Paper
1. Struct x
{
int i;
char c;
}

union y{
struct x a;
double d;
};

printf("%d",sizeof(union y));

a)8
b)5
c)4
d)1
ans:8


2. struct x{
char c1;
char c2;
int i;
short int j;
};

struct y{
short int j;
char c1;
char c2;
int i;
};

printf("%d %d",size of (struct x),size of (struct y));

a)12 12
b)8 8
c)12 8
d)8 12
ans:a


3. enum x {a=1,b,c,d,f=60,y}
printf("%d",y);
a)5
b)61
c)6
d)60
ans:b

4.
#include
void main(){
{
# define x 10

}
printf("%d \n",++x);
}

a)11
b)10
c)compile error
d)runtime error
ans:c

5. #include
void main()
{
int k=2,j=3,p=0;
p=(k,j,k);
printf("%d\n",p);

}
a)2
b)error
c)0
d)3

ans:a
6. How to typedef a function pointer which takes int as a parameter
and return an int
a)Is not possible
b)typedef int *funcptr int;
c)typedef int * funcptr( int);
d)typedef int (*funcptr)(int);
ans:d

7. #include
void main()
{
int k=10;
k<<=1;
printf("%d\n",k);
}
a)10
b)0
c)20
d)compilation error
ans:c

8. #include
void main()
{
int i=-10;
for(;i;printf("%d\n",i++));
}
a)error
b)prints -10 to -1
c)infinite loop
d)does not print anything
ans:b

9.
#include
void main()
{
int I=65,j=0;
for(;j<26; i++,j++){
printf("%s\n", i);
}
}
a)compilation Error
b)prints A to Z
c)prints a to z
d)runtime error
ans:b
10.
#include
void main()
{
unsigned int i=-1;
printf("%d\n",i);
printf("%u\n",i*-1);
}

a)runtime error
b)compilation error
c)prints -1 to 1
d)prints 1 and 1
ans:c
11.
#include
void main()
{
int **I;
int *j=0;
i=&j;
if (NULL != i&& NULL != *i){
printf("I am here");
}
}

a)prints I am here
b)does not print anything
c)compilaton error
d)runtime error

ans:b
12
#include
void main()
{
int *j=(int *)0x1000;
printf("%p",j);

}
a)prints-1000
b)runtime error
c)compilation error
d)none of the above

ans:d
13
#include
void main()
{
int a[2][2]={{2},{3}};
printf("%d",a[0][0]);
printf("%d",a[0][1]);
printf("%d",a[1][0]);
printf("%d",a[1][1]);
}
a) 2300
b)2000
c)0030
d)2030
ans:d

14) #include
void main(int x)

{
printf("%d",x) ;

}
if the name of the executable file is abc and the command line is
given as
abc xyz
what is the output
a)compilation error
b)1
c)2
d)undefined
ans:2

15. #include
void main(int argc)
{
char a[]={'1','2','3',0,'1','2','3'};
printf(a);
}

a) compilation error, b) 123, c) 123 123, d) 1230123
ANS:b

16. #include
void func(int *x)
{
x=(int *) malloc(sizeof(int));
printf("in func: %p\n",x);
}

void main(int argc)
{
int **pp;
int *p;
pp=(int **) malloc(sizeof(int *));
p=(int *) malloc(sizeof((int));
*pp=p;
printf("first:%p \n",*pp);
func(*pp);
printf("last %p \n",*pp);
}

assuming the p is equal to 1000 and x is equal to 2000 atfer malloc
calls

a) 1000,2000,1000, b) 1000,2000,2000, c) 1000,1000,1000 d)
2000,2000,2000
ANS:a

17. #include
#define const const
void main(int argc)
{
const int x=0;
}

a) compilation error, b) runs fine, c) runtime error, d) none
of these
ANS:b

18. #include
void main(int argc)
{
int d=1234.5678;
printf("%d",d);
}

a) error, b) 1234.5678, c) 1234, d) 1235
ANS:c

19. #include
void main(int argc)
{
int a[]={5,6};
printf("%d",a[1.6]);
}

a) 5, b) runtime error, c) compilation error, d) 6
ANS:d

20. #include
struct x
{
int i=0; /*line A*/
};
void main(int argc)
{
struct x y; /*line B*/
}

a) error due to B,
b) no problem with option A and B,
c) error somewhere other than line A and B,
d) error due to line A
ANS:d

21. #include
void main(int arg c)
{
int x=1111;
printf("%d",!x);
}
a.prints 1111
b.compilation error
c.prints 0
d.is not a valid option
ans:c
22. struct {
int len;
char *str
}*p;
++p -> len

a.increments p
b. increments len
c.compilation error
d.nothing happens with either of p and len
ans:b
23. int i=10;
a.declaration
b.definition
c.both
d.none
ans:c

24. #include
void main(int arg c)
{
char a[]=abcdefghijklmnopqrstuvwxyz;
printf(%d,sizeof(a));
}
a.25 b.26 c.27 d.28
ans:c
25. #include
void main(int arg c)
{
char a[]=abcdefghijklmnopqrstuvwxyz;
char *p=a;
printf(%d,strlen(p));
p+=10;
printf(%d,strlen(a));
}
a.26 26
b.26 16
c.compilation error
d.16 26
ans:a

26. if a file contains the IT solutions Inc.rn then on reading this
line the array str using fgets() what would str contain?
a. IT solutions Inc.
b. IT solutions Inc.r0
c. IT solutions Inc.rn0
d. IT solutions Inc.n0

27. if the following program (myprog)is run from the command line as
myprog 1 2 3
what would be the output?
Main(int argc , char *argv[])
{
int I ,j=0;
for (I=0;I j=j+atoi(argv[i]);
printf(%d.j);
}

a. 123 b.6 c.error d.123
ans:6
28. when pointers declared initialized to :
a. null
b.newly allocated memory
c)nothing,its random
d)none of the above
ans:c

29. what is the output of the following code?
#include
void main()
{
printf("%d",printf(" hello world "));
}

a) 13, b) hello world 13, c) hello world, d) error
ANS:b

30. what is the output of the following code, assuming that the array
begins at location 5364875?
#include
void main()
{
int a[2][3][4]={
{2,1,4,3,6,5,8,7,0,9,2,2}
{1,2,3,4,5,6,7,8,9,0,1,2}
};
printf("%u %u %u %u",a,*a,**a,***a);
}
a) 5364875,5364876,5364877,5364878
b) 5364875,5364876,5364877,2
c) 5364875,5364875,5364876,5364876
d) 5364875,5364875,5364875,2
ANS:d



  
Total Answers and Comments: 1 Last Update: April 08, 2006     Asked by: Krishna 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
April 07, 2006 23:22:33   #1  
franko        

RE: Caritor Campus Recruitment Paper

thankyou so much

this service gives me strength

drived out half of our interview fear


 
Is this answer useful? Yes | No

 Related Questions

I am MAK, a Mech. grad from Mysore trying to make "IT" big in IT industry.I attended the off-campus of Caritor, held at NIE, Mysore in the last week of August. Test was open for all students 
View Question | Asked by : Mithun Kashyap

1. Struct x{int i;char c;}union y{struct x a;double d;};printf("%d",sizeof(union y));a)8b)5c)4d)1ans:82. struct x{char c1;char c2;int i;short int j;};struct y{short int j;char c1;char c2;int 
Latest Answer : thankyou so muchthis service gives me strengthdrived out half of our interview fear ...
Read Answers (1) | Asked by : Krishna

I took the test before three weeks, Here are few of the questions i remember. There are two sections The aptitude section is very easy1.aptitude(30 minutes,30 questions)*verbal1.analogies2.word_____wordthere 
View Question | Asked by : Srikanth

We had 3 rounds. 1)60-minutes 30-aptitude(simple) 30-c-prog In this round 30 were short listed. 2)Group-discussion Topics-> Is communication an important issue?. Why people prefer US rather than India?. 
Latest Answer : I am a mechanical engineer. I got selected to Caritor. We had 4 rounds. 60 min written. then GD. Then technical. Then HR. For Non-IT people IT stuff is not asked at a point during the interview. They generally test for our ability to learn quickly and ...
Read Answers (17) | Asked by : Rajesh

In our college, out of 250 odd, 72 short listed for GROUP INTERVIEWGROUP INTERVIEW, (HR type but 10 people at a time, i.e. around the interviewer)Std., questions for each of the people: Tell me about yourself? 
View Question | Asked by : Ravi

Caritor (IT SOLUTIONS) has visited SRM today. Nearly 400 students appeared for the test and the test went on till 4:30 p.m. The test is of on-line type and it consists of two sections, I'll list them 
View Question | Asked by : Rakesh Narayanan

IT solutions - Caritor India ltd.APTITUDE QUESTIONS:1.a cube object 3” * 3” * 3” is painted with green in all the outer surfaces. If the cube is cut into cubes of 1”*1”*1”, 
Latest Answer : 3 cats eat 3 rats in 3 minutes.then,50 cats eat 100 rats in how many minutes?Ans:14 minutes ...
Read Answers (9) | Asked by : Naveen

C QUESTIONS:Briefcase ] 1. Struct x { int i; char c; } union y{ struct x a; double d; }; printf("%d",sizeof(union 
Latest Answer : Ans: 4. so you are trying to increment the MACRO. which is not possible in C/C++(lang i know).substitution will happen and it will place 10 at x..so your statement will be like..++10,which internally extends to 10 = 10+1,which is not possible,because ...
Read Answers (5) | Asked by : IT Guy

TECHNICAL ROUND C TIME:30 MINThere is technical round 0f 30 questions its optional between c or c++.choose c its very easy. Most of the questions are from yeshwant kanitkar’s TEST YOUR C SKILLS 
Latest Answer : do we have "c" round in caritor ...
Read Answers (2) | Asked by : Jyothi Shetty

I got selected in Caritor India Pvt. Ltd. through Anna University off-campus drive. The selection process was FIVE rounds such as1, Written TestAptitude: 30 Q\'s in 30 MintsC: 30 Q\'s in 30 Mints(easy 
Latest Answer : Please read the book of Test your skills in C By Y Kanetkar ...
Read Answers (26) | Asked by : Jovial Jithan


 Sponsored Links

 
Related Articles

Benefiting from On-Campus Interviews

Although it is a slowly dying trend on-campus interviews of different companies still exist. Well known companies in the neighborhood or in the case of Ivy League schools multi-million corporations visit the schools with the hopes of finding an enthusiastic candidate who will work with them right af
 

Related Categories
Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape