PAPER: RAMCO PLACEMENT PAPER (APTITUDE, C, C++)
Directions: Each of the following question has a question and two statements labelled as (i) and (ii). Use the data/information given in (i) and (ii) to decide whether the data are sufficient to answer the question record your answer as
A) If you can get the answer from (1)alone but not from (2)
B) If you can get the answer from (2)alone but not from (1)
C) If can get the answer from (1)and (2)together ,although neither statement by itself suffice
D) If statement (1)alone suffices and statement (2) alone also suffice.
E) If can't get the answer from statements (1) and (2) together and you need more data.
What will be the population of city X in 1991?
1) Population of the city has 55% annual growth rate
2) in 1991,the population of city X was 8 million
Ans: C
Was it Rani's birthday yesterday?
1)Lata spends Rs.100 on Rani's birthday
2)Lata spent Rs.100 yesterday
Ans: E
Is 3*5 or is 4*6 greater ?
1) a*b =b*a
2) a*b is the remainder of ab%(a+b)
Ans: B
Will the graph X-Y pass through the origin?
1) x proportional to the Y
2)increment in y per units rise of x is fixed.
Ans: E
What was the value of the machine 2 years ago?
1) the deprecition of the value of the machine per year is 10%
2)present value of the machine is rs 8000/
Ans: C
What will be the area of a square that can be inscribed in a circle?
1) Radius of the circle is T
2) Length of a diagonal of the square is 2r
Ans: D
There are two figures viz., a circle and a square. Which having greater area?
1) Perimeter of the circle is the same as the perimeter of the square.
2) Eleven times the radius is equal to seven times the length of one side of the square.
Ans: D
A candidate who was found to be under weight in medical test had been selected provisionally subject to his attainment of 60Kg weight within one year. What should be the percentage increase of his weight so that selection is confirmed after one year.
1) Weight (Kg)=16+8 Height (ft) is standard equation for the Indian population. The candidates height is 5.5
2) His present weight is 55Kg.
Ans: D
Is angle µ=90
1) sin**2(µ)+cos**2(µ)=1
2) sin**2(µ)-+cos**2(µ)=1
Ans: E
What will be the average age of workers of an Institution after two years?
1) Present average age is 35 years
2) There are total 20 workers in the Institution
Ans: A
Is AB>AM ( A Triangle is given )
1) AB<AC
2) M is any point other than B and C on BC
Ans: E
Is X^2+Y^2<X+Y?
1) 0<X<1
2) 0<Y<1 and X!=Y (X not equal to Y)
Ans: C
Can it be concluded that angle ABO = angle ODC
1) ABCD is a Parallelogram and O is the point of intersection of the diagonals.
2) Angle DOC =75deg. and angle DAO =35deg.
Ans: A
What is the value of x+y?
1) 2y=x+6
2) 5x=10y-30
Ans: E
How many students are there in the class?
1) 30 students play foot ball and 40 play cricket .
2)Each student plays either foot ball or cricket or both.
Ans: E
What is the value of a:b?
1) a=x+10%ofx
2) b=a+10%ofa
Ans: B
What is the maximum value of the expression 5+8x-8x^2?
1) x is real
2) x is not positive
Ans: C
What will be the value of the greatest angle of the triangle ABC?
1) Angles of the triangle are in the ration 2:5:3
2) The side opposite to the greatest angle is the longest side.
Ans: A
What is the range of values of x?
1)( x-2 ) / ( 2x + 5 ) < 1/3
2)2x /3 + 17/3 > 3x - 20
Ans: D
Of the two which one is the greater -- -3/x , -3/y?
1) x,y>0 <![endif]>
Technical Questions
1. Find the output for the following C program
main()
{
char *p1="Name";
char *p2;
p2=(char *)malloc(20);
while(*p2++=*p1++);
printf("%s
",p2);
}
Ans. An empty string
2. Find the output for the following C program
main()
{
int x=20,y=35;
x = y++ + x++;
y = ++y + ++x;
printf("%d %d
",x,y);
}
Ans. 57 94
3. Find the output for the following C program
main()
{
int x=5;
printf("%d %d %d
",x,x<<2,x>>2);
}
Ans. 5 20 1
4. Find the output for the following C program
#define swap1(a,b) a=a+b;b=a-b;a=a-b;
main()
{
int x=5,y=10;
swap1(x,y);
printf("%d %d
",x,y);
swap2(x,y);
printf("%d %d
",x,y);
}
int swap2(int a,int b)
{
int temp;
temp=a;
b=a;
a=temp;
return;
}
Ans. 10 5
5. Find the output for the following C program
main()
{
char *ptr = "Ramco Systems";
(*ptr)++;
printf("%s
",ptr);
ptr++;
printf("%s
",ptr);
}
Ans. Samco Systems
6. Find the output for the following C program
#include<stdio.h>
main()
{
char s1[]="Ramco";
char s2[]="Systems";
s1=s2;
printf("%s",s1);
}
Ans. Compilation error giving it cannot be an modifiable 'lvalue'
7. Find the output for the following C program
#include<stdio.h>
main()
{
char *p1;
char *p2;
p1=(char *) malloc(25);
p2=(char *) malloc(25);
strcpy(p1,"Ramco");
strcpy(p2,"Systems");
strcat(p1,p2);
printf("%s",p1);
}
Ans. RamcoSystems
8. Find the output for the following C program given that
[1]. The following variable is available in file1.c
static int average_float;
Ans. All the functions in the file1.c can access the variable
9. Find the output for the following C program
# define TRUE 0
some code
while(TRUE)
{
some code
}
Ans. This won't go into the loop as TRUE is defined as 0
10. Find the output for the following C program
main()
{
int x=10;
x++;
change_value(x);
x++;
Modify_value();
printf("First output: %d
",x);
}
x++;
change_value(x);
printf("Second Output : %d
",x);
Modify_value(x);
printf("Third Output : %d
",x);
}
Modify_value()
{
return (x+=10);
}
change_value()
{
return(x+=1);
}
Ans. 12 1 1
11. Find the output for the following C program
main()
{
int x=10,y=15;
x=x++;
y=++y;
printf("%d %d
",x,y);
}
Ans. 11 16
12. Find the output for the following C programming()
{
int a=0;
if(a=0) printf("Ramco Systems
");
printf("Ramco Systems
");
}
Ans. Ony one time "Ramco Systems" will be printed
13. Find the output for the following C program
#include<stdio.h>
int SumElement(int *,int);
void main(void)
{
int x[10];
int i=10;
for(;i;)
{
i--;
*(x+i)=i;
}
printf("%d",SumElement(x,10));
}
int SumElement(int array[],int size)
{
int i=0;
float sum=0;
for(;i<size;i++)
sum+=array[i];
return sum;
}
14. Find the output for the following C program
#include<stdio.h>
void main(void);
int printf(const char*,...);
void main(void)
{
int i=100,j=10,k=20;
-- int sum;
float ave;
char myformat[]="ave=%.2f";
sum=i+j+k;
ave=sum/3.0;
printf(myformat,ave);
}
15. Find the output for the following C program
#include<stdio.h>
void main(void);
{
int a[10];
printf("%d",((a+9) + (a+1)));
}
16. Find the output for the following C program
#include<stdio.h>
void main(void)
{
struct s{
int x;
float y;
}s1={25,45.00};
union u{
int x;
float y;
} u1;
u1=(union u)s1;
printf("%d and %f",u1.x,u1.y);
}
17. Find the output for the following C program
#include<stdio.h>
void main(void)
{
unsigned int c;
unsigned x=0x3;
scanf("%u",&c);
switch(c&x)
{
case 3: printf("Hello! ");
case 2: printf("Welcome ");
case 1: printf("To All ");
default:printf("
");
}
}
18. Find the output for the following C program
#include<stdio.h>
int fn(void);
void print(int,int(*)());
int i=10;
void main(void)
{
int i=20;
print(i,fn);
}
void print(int i,int (*fn1)())
{
printf("%d
",(*fn1)());
}
int fn(void)
{
return(i-=5);
}
19. Find the output for the following C program
#include<stdio.h>
void main(void);
{
char numbers[5][6]={"Zero","One","Two","Three","Four"};
printf("%s is %c",&numbers[4][0],numbers[0][0]);
}
20. Find the output for the following C program
int bags[5]={20,5,20,3,20};
void main(void)
{
int pos=5,*next();
*next()=pos;
printf("%d %d %d",pos,*next(),bags[0]);
}
int *next()
{
int i;
for(i=0;i<5;i++)
if (bags[i]==20)
return(bags+i);
printf("Error!");
exit(0);
}