Caritor Technical Round C

TECHNICAL ROUND C TIME:30 MIN
There 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 Book.
Buy this book and prepare its, very nice.

NOTE;1>QESTIONS ARE NOT IN ORDER.
2> DATA MAY VARY, BUT QUESTIONS LIKE THIS.
main
{
int a[5]={2,3};
printf(“%d%d%d”,a[2],a[3],a[4]);
}
ANS: 0 0 0

extern int I;
is it a declaration or definition?

ANS: DECLARATION

3>MAIN()
{
int i=-3,j=2,k=0,m;
m= ++j&&++i||++k;
printf(“%d%d%d”,i,j,k,m);
}

4>
main()
{
int i=-3,j=2,k=0,m;
m= ++j&&++i&&++k;
printf(“%d%d%d”,i,j,k,m);
}

5.>main()
{
const int i=7;
printf(“%d”,++i);
}

ANS: COMPILATION ERROR

6>
#define I 6
main()
{
printf(“%d”,++I);
}

ANS: COMPILATION ERROR


7>if 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);
}

ANS: 1002 1002 1002 1


8>
MAIN()
{
printf(“%c”,7[“sundaram”]);
}

ANS: m


9>struct name
{
int a;
char b;
char n;
short s;
}n1;
main()
{
printf(“%d”,sizeof(n1));


10>
main()
{
enum{ m=2,n,o=60,p};
printf(“%d”,p);
}

ANS: 61

11>
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?

ANS:”I am a boy \n\0”

12>
in command line enter myprog 1 2 3 what is output?
Main(int argc , char * argv[])
{
int I,j=0;
for(i=0;ij=j+atoi(argv[i]);
printf(%d”,j);
}

ANS: 6

13>
in command line enter myprog Friday Tuesday Thursday what is output?
Main(int argc , char * argv[])
{
printf(“%c”,**++argv):
}

ANS: f

14>
main()
{
printf(“%d”,-1>>4);
}

ANS: 0fff

THAT’S ALL I REMEMBERED ON C

APTITUDE SECTION TIME: 30MIN

MOST OF THE QUESTIONS FROM R S AGARWAL BOOK

1>ONE PROBLEM IS ON GAIN OR LOSS?

ANS:25% LOSS

2>A QUESTION ON SOME BOY BREAK CUPS, HOW MANY HE BROKES?

ANS: 5 CUPS

A SQUARE FIELD OF grass (5m*5m), at one corner a goat is tied with 3m long rope.
What is area of field available for a goat to eat grass?

ANS: PI* 3*3/4


4? A (3*3*3) CUBE IS PAINTED ON ALL SIDES, LATER IT CUT DOWN INTO (1*1*1) CUBES
WHAT IS MAX NUMBER OF CUBES WHICH ARE NOT PAINTED ON ANY OF ITS FACES?

5>HOW MANY FACES, EDGES,VERTICES ON CUBE?

6>A COMPANY IS RECRUITING FRESHERS ON C OR C++. 241 MEMBERS ARE APPLIED.
40 PERSONS RESUME ARE DISCARDED FOR THEY DON’T KNOW C OR C++. 185 PEOPLE KNOW C++ AND 186 PEOPLE KNOW C, HOW MANY PEOPLE KNOW ONLY C?

ANS:16

Showing Answers 1 - 4 of 4 Answers

sandhya

  • Aug 3rd, 2006
 

i attended caritor jus two weeks back tech waz simple as i waz a ece student so sir jus asked me about ma project and then he asked me how will i place sensor on road to control traffic sensor need to placed so that we use min no of them and its a junction vecles come frm 4 sides the direction wth max vehicle need to be cleared, i gave him reply.then 10 min after i waz caleed on for hr but i lostin hr.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions