# Crescent Technosoft Placement-Paper

Discussion in 'Latest Placement papers' started by krishna, Sep 2, 2013.

1. ### krishnaBanned

Aptitude Question Paper

1. When a student weighing 45 kgs left a class, the average weight of the remaining 59 students increased by 200g. What is the average weight of the remaining 59 students?

A.57
B.56.8
C.58.2
D.52.2
Ans:A
Ex:Let the average weight of the 59 students be A.
Therefore, the total weight of the 59 of them will be 59A.
The questions states that when the weight of this student who left is added, the total weight of the class = 59A + 45
When this student is also included, the average weight decreases by 0.2 kgs.
59A + 45/ 60 = A - 0.2
=> 59A + 45 = 60A – 12
=> 45 + 12 = 60A - 59A
=> A = 57

2. Two students appeared at an examination. One of them secured 9 marks more than the other and his marks was 56% of the sum of their marks. The marks obtained by them are:

A.39, 30
B.41, 32
C.42, 33
D.43, 34
Ans:C
Ex:Let their marks be (x + 9) and x.
Then, x + 9 = (56/100)(x + 9 + x)
25(x + 9) = 14(2x + 9)
3x = 99
x = 33
So, their marks are 42 and 33.

3. A class photograph has to be taken. The front row consists of 6 girls who are sitting. 20 boys are standing behind. The two corner positions are reserved for the 2 tallest boys. In how many ways can the students be arranged?

A.6! * 1440
B.18! * 1440
C.18! *2! * 1440
D.None of these
Ans:B
EX:Two tallest boys can be arranged in 2! ways, rest 18 can be arranged in 18! ways.
Girls can be arranged in 6! ways.
Total number of ways in which all the students can be arranged = 2! * 18! * 6!
= 18! *1440

4. Sachin can cover a distance in 1hr 24min by covering 2/3 of the distance at 4 kmph and the rest at 5kmph.the total distance is?

A.5 km
B.6 km
C.7 km
D.8 km
Ans:B
EX:Let total distance = D
Distance travelled at 4 kmph speed = (2/3)D
Distance travelled at 5 kmph speed = (1 - 2/3)D = (1/3)D
Total time = 1hr 24 min = (60+24)min = (84/60)hr = (21/15)hr
We know, time = distance/speed
Total time = (21/15)={(2/3)D}/4 + {(1/3)D} /5
21/15 = {2D}/12 + {D}/15
21/15={14D}/60
84 = 14D
D=6km

5. Two pipes can fill the cistern in 10hr and 12 hr respectively, while the third empty it in 20hr. If all pipes are opened simultaneously, then the cistern will be filled in

A.7.5 hr
B.8 hr
C.8.5 hr
D.10 hr
Ans:A
Ex:Work done by all the tanks working together in 1 hour.
=> 1/10 + 1/12 - 1/20 = 2/15
Hence, tank will be filled in 15/2 = 7.5 hour

6. The total age of some 7 years old and some 5 years old children is 60 years. If I have to select a team from these children such that their total age is 48 years, In how many ways can it be done?

A.3
B.2
C.1
D.4
Ans:C
Ex:Let 'a' children of 7 years and 'b' children of 5 years be taken.
Then 7a+5b =48
This is possible only when a=4 and b=4
Hence only one combination is possible.

7. A candidate who gets 20% marks fails by 10 marks but another candidate who gets 42% marks gets 12% more than the passing marks. Find the maximum marks.

A.50
B.100
C.150
D.200
Ans:B
Ex:From the given statement pass percentage is 42% - 12% = 30%
By hypothesis, 30% of x – 20% of x = 10 (marks)
i.e., 10% of x = 10
Therefore, x = 100 marks.

8. A boat can travel with a speed of 13 km / hr in still water. If the speed of the stream is 4 km / hr. find the time taken by the boat to go 68 km downstream?

A. 2 hours
B. 3 hours
C. 4 hours
D. 5 hours
Ans:C
Ex:Speed Downstream= (13 + 4) km/hr
= 17 km/hr.
Time taken to travel 68 km downstream =(68 / 17)hrs
= 4 hrs.

9.The difference between the place values of 7 and 3 in the prime number 527435 is

A. 4
B. 5
C. 45
D. 6970
Ans
Explace value of 7)-(place value of 3)
= (7000 - 30)
= 6970.

10. A woman introduces a man as the son of the brother of her mother. How is the man, related to the woman?

A. Nephew
B. Son
C. Cousin
D. Grandson
Ans:C
Ex:Brother of mother->uncle;
uncle's son ->cousin
2. ### krishnaBanned

Technical Question Paper

1. main()
{
int k=1;
printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE");
}

1==1 is TRUE

Explanation:
When two strings are placed together (or separated by white-space) they are concatenated (this is called as "stringization" operation). So the string is as if it is given as "%d==1 is %s". The conditional operator( ?: ) evaluates to "TRUE".

2.#define max 5
#define int arr1[max]
main()
{
typedef char arr2[max];
arr1 list={0,1,2,3,4};
arr2 name="name";
printf("%d %s",list[0],name);
}
Compiler error (in the line arr1 list = {0,1,2,3,4})

Explanation:
arr2 is declared of type array of size 5 of characters. So it can be used to declare the variable name of the type arr2. But it is not the case of arr1. Hence an error.
Rule of Thumb:
#defines are used for textual replacement whereas typedefs are used for declaring new types.

3. main()
{
int i=-1;
-i;
printf("i = %d, -i = %d \n",i,-i);
}

i = -1, -i = 1

Explanation:
-i is executed and this execution doesn't affect the value of i. In printf first you just print the value of i. After that the value of the expression -i = -(-1) is printed.

4. main()
{
int i=5,j=6,z;
printf("%d",i+++j);
}

11

Explanation:
the expression i+++j is treated as (i++ + j)

5. What are the files which are automatically opened when a C file is executed?
stdin, stdout, stderr (standard input,standard output,standard error).

6. Find the output of the following program
class base
{
public:
void baseFun(){ cout<<"from base"<<endl;}
};
class deriublic base
{
public:
void baseFun(){ cout<< "from derived"<<endl;}
};
void SomeFunc(base *baseObj)
{
baseObj->baseFun();
}
int main()
{
base baseObject;
SomeFunc(&baseObject);
deri deriObject;
SomeFunc(&deriObject);
}

from base
from base

Explanation:
As we have seen in the previous case, SomeFunc expects a pointer to a base class. Since a pointer to a derived class object is passed, it treats the argument only as a base class pointer and the corresponding base function is called. </endl;}
</endl;}

7.Find the output of the following program<<"*pa="<<*pa <<" ra"<
class some{
public:
some()
{
cout<<"some's destructor"<
}
};

void main()
{
some s;
s.~some();
}

some's destructor
some's destructor

<<"*pa="<<*pa <<" ra"<
Explanation:
Destructors can be called explicitly. Here 's.~some()' explicitly calls the
destructor of 's'. When main() returns, destructor of s is called again,
hence the result.

8.Find the output of the following program<<"*pa="<<*pa <<" ra"<
public:
};

if(*this == temp ){
cout<<"The both are same objects\n";
return true;
}
else{
cout<<"The both are different\n";
return false;
}
}

void main(){
a1= =a2;
}

Runtime Error: Stack Overflow
<<"*pa="<<*pa <<" ra"<
Explanation :Just like normal functions, operator functions can be called recursively. This program just illustrates that point, by calling the operator == function recursively, leading to an infinite loop.

9.Find the output of the following program<<"*pa="<<*pa <<" ra"<
class complex{
double re;
double im;
public:
complex() : re(1),im(0.5) {}
bool operator==(complex &rhs);
operator int(){}
};

bool complex:perator == (complex &rhs){
if((this->re == rhs.re) && (this->im == rhs.im))
return true;
else
return false;
}

int main(){
complex c1;
cout<< c1;
}

Explanation:
The programmer wishes to print the complex object using output
re-direction operator, which he has not defined for his lass. But the compiler instead of giving an error sees the conversion function
and converts the user defined object to standard object and prints
some garbage value.

10.Find the output of the following program
class complex{
double re;
double im;
public:
complex() : re(0),im(0) {}
complex(double n) { re=n,im=n;};
complex(int m,int n) { re=m,im=n;}
void print() { cout<<};

void main(){
complex c3;
double i=5;
c3 = i;
c3.print();
}