TCS
Company
(4,2)=16
(6,5)=13
(8,3)=65
(9,1)=96
(7,4)=?
options
a.39
b.13
c.53
d.42
e.none of these
Read Solution (Total 8)
-
- 1st no. + (2nd no.+2) * (1st no. - 2nd no.)
So ans is (7+4+2)*3=39
ans: c)39 - 11 years agoHelpfull: Yes(46) No(12)
- (a,b)=(a+b+2)*(a-b)
(4,2)=(4+2+2)*(4-2)=16
(6,5)=(6+5+2)*(6-5)=13
(8,3)=(8+3+2)*(8-3)=65
(9,1)=(9+1+2)*(9-1)=96
hence..
(7,4)=(7+4+2)*(7-4)=39
so answer is=39 - 11 years agoHelpfull: Yes(25) No(0)
- ans=39,(a+b+2)*(a-b)
- 11 years agoHelpfull: Yes(1) No(0)
- 1stno.+(2nd no.+2)*(1st no.-2nd no.)
so ans is 39 - 11 years agoHelpfull: Yes(1) No(1)
- Heyyy JAGYANDUTTA CHOUDHURY please let u tell me the meaning of ^ which is used between tow nos like 2^4????????
- 11 years agoHelpfull: Yes(0) No(1)
- ^ means the power
2^4 means that the power of 2 is 4 that is 2*2*2*2=16 - 11 years agoHelpfull: Yes(0) No(3)
- (Ist No + IInd No)*(Ist No-IInd No)
Ans-a - 11 years agoHelpfull: Yes(0) No(3)
- a> 39 is ans
6+(5+2)*(6-5)
similarly all d ans - 11 years agoHelpfull: Yes(0) No(2)
TCS Other Question
sum of all even numbers between 99 to 301 is?
More and more programming languages today are embracing the phenomenon of automatic memory management. As a Language Development Lead your supervisor is responsible for managing memory allocation routines of the Language Compiler. Since this is beta release of the language your supervisor is developing, he wants to keep memory management routines clean and simple.
Rules for allocating memory are quite simple :
Continuous memory locations can be merged together to form a “Free List”. Free Lists are maintained via indexes in simple data structures.
When it comes to memory allocations, routines should prefer Exact-Fit over First-Fit
If and only if there is no Exact-Fit, the routines should find the First-Fit where the object can be allocated.
You are developing this memory-subsystem as per specifications provided by your supervisor. Go ahead and crack the problem. Specifications are as depicted below :
Input Format:
Line 1
Input absolute path of the memory representation file
Line 2
Memory allocation required by the object
File Format:
Each memory representation file consists of 4 column separated by a comma. File will end with a New Line character. The 4 fields are as depicted below :
Index Id, Start Offset, File Size, Delete Flag
Output Format:
Print “Inserted at index I”,where I is position where insertion is made or “Can not be inserted”,if insertion in any index is not possible
Line 1
For Valid Input,print
“Inserted at index I”,where I is position where insertion is made
Or
“Can not be inserted” if insertion is not possible
Sample Test Cases:
File:Input.txt
1,1,100,N
2,101,250,N
3,352,100,Y
4,453,50,N
5,504,100,Y
6,605,100,Y
7,606,100,N