0% found this document useful (0 votes)
262 views9 pages

Caritor Test Paper Overview

This document contains 14 multiple choice questions related to C programming. The questions cover topics like data types, operators, arrays, pointers, structures, unions, typedefs, and command line arguments. Sample questions include identifying the output of code snippets involving data type conversions, structure sizes, bitwise operators, string manipulation functions, and command line parsing.

Uploaded by

api-3742645
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
262 views9 pages

Caritor Test Paper Overview

This document contains 14 multiple choice questions related to C programming. The questions cover topics like data types, operators, arrays, pointers, structures, unions, typedefs, and command line arguments. Sample questions include identifying the output of code snippets involving data type conversions, structure sizes, bitwise operators, string manipulation functions, and command line parsing.

Uploaded by

api-3742645
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

Test Paper I

1 Answer the following question based on the information given in the graph below

sales price
Standard Quality Screws Rs 5.70 per 100
Sub Standard Quality Screws Rs 2.85 per 100
By how much did the total sales value of November's Screw production vary from October's?
a) Rs. 285.00 (Increase
b) No change
c) Rs. 142.50 (Decrease) d) RS 28.50 (Decrease)

2. Five friends Lokesh, Manoj, Neeraj, Raveesh and Rohit have agreed to work together on a part-
time job offered by a
local restaurant. The restaurant works five days a week and this group has the following schedule
when they can work
1 Neeraj and Raveesh can work on Monday, Tuesday and Wednesday
2 Raveesh and Rohit can work on Monday, Wednesday and Thursday
3 Rohit and Lokesh can work on Monday, Friday and Thursday
3 Lokesh and Manoj can work on Friday, Tuesday and Thursday
4 Neeraj and Manoj can work on Friday, Tuesday and Wednesday
Which one of the five friends cannot work on Thursdays?

3. The cost, in dollars,f manufacturing x refrigerators is 9,000 + 400x. The amount received when
selling these x
refrigerators is 500x dollars. What is the least number of refrigerators that must be manufactured
and sold so that the
amount received is at least the manufacturing cost?
a) 10
b) 18
c) 19
d) 50

4. Select A - If you think the statement is patently true or follows logically given the information or
opinions contained
in the passage
Select B - If the statement is patently untrue or the opposite follows logically, given the
information or opinions
contained in the passage
Select C - If you cannot say whether the statement is true or untrue or follows logically without
further information
The big economic difference between nuclear and fossil-fueled power stations is that the nuclear
reactors are more
expensive to build and decommission, but cheaper to run. So dispute over the relative efficiency
of the two systems
revolve not just around the prices of coal and uranium today and tomorrow, but also around the
way in which the future
income should be compared with current inco
If nuclear reactors were cheaper to build and decommission than fossil fuelled power stations,
they would definitely
have the economic advantage.

5 In this test, you are given two words outside the brackets. You have to fill in the brackets with a
word which has a
similar meaning (maybe in a different context) as that of the words on the right and left hand side
of the brackets.
FINAL ( ) ULTIMATE
a) end
b) Last
c) Finish
d) Dead

6 A takes 4 days to finish a job and B takes 5 days. If both of them work together on the same job,
what proportion of
the work is done by A?
a) 5/9
b) 4/9
c) 6/9
d) 7/9

7. In the right angled triangle below, if tan Ө + sin Ө = 32 / 15 and all sides are whole numbers, find
cos Ө .

a) 12/13
b) 4/5
c) 5/13
d) 3/5

8. A and B can separately do a piece of work in 10 and 15 days respectively. They work together for
some time and then
B caritorstops. If A completes the rest of the work in 5 days, then B has worked for
a) 5 day
b) 4 day
c) 2 day
d) 3 day
9. Which of the following circles contains letters in a different order?

10. Five friends Lokesh, Manoj, Neeraj, Raveesh and Rohit have agreed to work together on a part-
time job offered by a
local restaurant. The restaurant works five days a week and this group has the following schedule
when they can work
1 Neeraj and Raveesh can work on Monday, Tuesday and Wednesday
2 Raveesh and Rohit can work on Monday, Wednesday and Thursday
3 Rohit and Lokesh can work on Monday, Friday and Thursday
4 Lokesh and Manoj can work on Friday, Tuesday and Thursday
5 Neeraj and Manoj can work on Friday, Tuesday and Wednesday
Which is the one who cannot work on Tuesdays

11. There are 200 employees in a company. An external vendor is chosen to Serve coffee twice a
day. 100 coffee cups
were offered by the company but as an incentive to have the cups in tact at the end of the day,
the company offered
30 paise for every cup remained safely and charged 90 paise for every broken cup. At an end of
a day, the vendor
received Rs. 24. How many cups did the vendor break?
a) 10
b) 20
c) 8
d) 5

12. Each problem in this test consists of a series of diagrams, which follow a logical sequence. You
are to choose
the next diagram in the series from the four options on the right. Then indicate your answer by
choosing the
correct one (A B C D) .

(sorry could not retrieve image)

A B C D

13. 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", how many 1" cubes will have at least one surface painted.
a. 8 b.26 c.27 d. none ans.b

14. a & b can separately do a piece of work in 10 & 15 days respectively. They work together for
sometimes and
b stops. If a completes the rest of work in 5 days ,then b has worked for
a.5 b.4 c.3 d.2 (days). Ans.c
C Questions
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

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<stdio.h>
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

10. #include<stdio.h>
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

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<stdio.h>
void main()
{
int k=10;
k<<=1;
printf("%d\n",k);
}
a) 10
b) 0
c) 20
d) compilation error
ans:c

8. #include<stdio.h>
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<stdio.h>
void main(int x)
{
printf("%d",x) ;
}
if the name of the executable file is abc and the command line is given as abc xy what
is the output
a)compilation error
b) 1
c) 2
d) undefined
ans:2

18. #include<stdio.h>
void main(int argc)
{
int d=1234.5678;
printf("%d",d);
}
a) error, b) 1234.5678, c) 1234, d) 1235
ANS:c

19. #include<stdio.h>
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

21. #include<stdio.h>
void main(int arg c)
{
int x=1111;
printf("%d",!x);
}
[Link] 1111
[Link] error
[Link] 0
[Link] not a valid option
ans:c

23. int i=10;


[Link]
[Link]
[Link]
[Link]
ans:c

25. #include<stdio.h>
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
[Link] error
d.16 26
ans:a
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<argc;I++)
j=j+atoi(argv[i]);
printf(%d.j);
}
a. 123 b.6 [Link] d.123
ans:6
29. what is the output of the following code?
#include<stdio.h>
void main()
{
printf("%d",printf(" hello world "));
}
a) 13, b) hello world 13, c) hello world, d) error
ANS:b

You might also like