Trilogy Previous Years Solved Sample Placement Papers
-
The values of shares (in Rs) of A, B, and C from January to June are as follows:
Month A B C January 30 60 80 February 35 65 85 March 45 75 65 April 40 75 82 May 55 75 85 June 50 75 80
- During this period, which share has undergone maximum fluctuation?
Ans: Share C
- In which month is it possible to buy B and C by selling A?
Ans: March
- In which month are the share values very low?
Ans: January
- By purchasing one share of A and four each of B and C in the beginning of the period, when should these be sold to get the maximum profit?
Ans: May
- During this period, which share has undergone maximum fluctuation?
-
What will the following program do?
void main() { int i; char a[] = "String"; char *p = "New String"; char *Temp; Temp = a; a = malloc(strlen(p) + 1); strcpy(a, p); // Line number: 9 p = malloc(strlen(Temp) + 1); strcpy(p, Temp); printf("(%s, %s)", a, p); free(p); free(a); } // Line number 15
(a) Swap contents of p & a and print: (New string, string)
(b) Generate compilation error in line number 8 (Ans)
(c) Generate compilation error in line number 5
(d) Generate compilation error in line number 7
(e) Generate compilation error in line number 1
-
In the following code segment, what will be the result of the function?
Value of x , value of y { unsigned int x = -1; int y; y = ~0; if(x == y) printf("same"); else printf("not same"); }
(a) same, MAXINT, -1 (Ans)
(b) not same, MAXINT, -MAXINT
(c) same, MAXUNIT, -1
(d) same, MAXUNIT, MAXUNIT
(e) not same, MAXINT, MAXUNIT
-
What will be the result of the following program?
char *gxxx() { static char xxx[1024]; return xxx; } main() { char *g = "string"; strcpy(gxxx(), g); g = gxxx(); strcpy(g, "oldstring"); printf("The string is : %s", gxxx()); }
(a) The string is : string
(b) The string is : Oldstring (Ans)
(c) Run time error/Core dump
(d) Syntax error during compilation
(e) None of these
|
|
IVEGA Previous Years Solved Sample Placement Papers
-
Eight years ago, Pranathi’s age was equal to the sum of the present ages of her one son and one daughter. Five years hence, the respective ratio between the ages of her daughter and her son that time will be 7:6. If Pranathi’s husband is 7 years elder to her and his present age is three times the present age of their son, what is the present age of the daughter?
A. 19 years
B. 27 years
C. 15 years
D. 23 years
Ans: D. 23 years
Explanation:
P – 8 = S + D —(1)
6D + 30 = 7S + 35 —(2)
H = 7 + P
H = 3S
3S = 7 + P —-(3)
Solving equation (1),(2) and (3) D = 23
Therefore, the present age of the daughter is 23 years -
Shas married 8 years ago. Today her age is 9/7 times to that time of marriage. At present his son’s age is 1/6th of her age. What was her son’s age 3 years ago?
A. 4 yr
B. 2 yr
C. 3 yr
D. 5 yr
Ans: B. 2 yr
Explanation:
Let us assume that Shas’s age 8 years ago = x
Present age = x + 8
x + 8 = 9/7 x
7(x + 8)= 9x
x = 28; 28 + 8 = 36
Son’s age = 1/6 * 36 = 6
Son’s age 4 years ago = 6-4 =2 -
The respective ratio between the present age of Mani and Dheeraj is x : 42. Mani is 8 years younger than Murali. Murali’s age after 8 years will be 33 years. The difference between Dheeraj’s and Mani’s age is same as the present age of Murali. What is the value of x?
A. 18
B. 10
C. 16
D. 17
Ans: D. 17
Explanation:
Murali’s age after 8 years = 33 years
Murali’s present age = 33 – 8= 25 years
Mani’s present age = 25 – 8 = 17 years
Dheeraj’s present age = 17 + 25 = 42 years
Ratio between Mani and Dheeraj = 17: 42
X = 17 -
Revanth’s present age is three times his son’s present age and 4/5th of his father’s present age. The average of the present ages of all of them is 62 years. What is the difference between Revanth’s son’s present age and Revanth’s father’s present age?
A. 64 years
B. 69 years
C. 66 years
D. 62 years
Ans: C. 66 years
Explanation:
Present age of Revanth is = 4/5x
Present age of Revanth’s father is = 4/15x
Ratio = 15: 12 : 4
Difference between the Revanth’s son’s present age and Revanth’s father’s present age = 62/31 * 3(15 – 4).
= 2*3*11 = 66 years. -
36% of 945 – 26% of 765 + 17.7 =?
A. 167
B. 187
C. 159
D. 143
Ans: C. 159
Explanation:
340.2 – 198.9 =141.3+17.7 = 159 -
√(456÷12+142-11) =?
A. 11
B. 169
C. 23
D. 13
Ans: D. 13
Explanation:
38+142-11 = 169 = 13*13 -
1(1/5) of 1(1/2) of ? = 216
A. 100
B. 125
C. 140
D. 120
Ans: D. 120
Explanation:
6/5*3/2 *x = 216
X = 216*2*5/6*3 = 2160/18 = 120 -
Which of the following is an infix expression?
a) (a+b)*(c+d)
b) ab+c*
c) +ab
d) abc+*
Answer: a
Explanation: (a+b)*(c+d) is an infix expression. +ab is a prefix expression and ab+c* is a postfix expression.
-
What is the time complexity of an infix to postfix conversion algorithm?
a) O(N log N)
b) O(N)
c) O(N²)
d) O(M log N)
Answer: b
Explanation: The time complexity of an infix to postfix expression conversion algorithm is mathematically found to be O(N).
-
What is the postfix expression for the corresponding infix expression?
a+b*c+(d*e)
a) abc*+de*+
b) abc+*de*+
c) a+bc*de+*
d) abc*+(de)*+
Answer: a
Explanation: Using the infix to postfix expression conversion algorithm, the corresponding postfix expression is found to be abc*+de*+.
-
Parentheses are simply ignored in the conversion of infix to postfix expression.
a) True
b) False
Answer: b
Explanation: When a parenthesis is encountered, it is placed on the operator stack. When the corresponding parenthesis is encountered, the stack is popped until the other parenthesis is reached and they are discarded.
-
Ethernet system uses which of the following technology?
(A) Bus
(B) Ring
(C) Star
(D) Tree
-
Which of the following are the network services?
(A) File service
(B) Print service
(C) Database service
(D) All of the above
-
If all devices are connected to a central hub, then topology is called:
(A) Bus Topology
(B) Ring Topology
(C) Star Topology
(D) Tree Topology
-
FDDI stands for:
(A) Fiber Distributed Data Interface
(B) Fiber Data Distributed Interface
(C) Fiber Dual Distributed Interface
(D) Fiber Distributed Data Interface