What are the various registers in 8085? - Accumulator register, Temporary register, Instruction register, Stack Pointer, Program Counter are the various registers in 8085 .
In 8085 name the 16 bit registers? - Stack pointer and Program counter all have 16 bits.
What are the various flags used in 8085? - Sign flag, Zero flag, Auxillary flag, Parity flag, Carry flag.
What is Stack Pointer? - Stack pointer is a special purpose 16-bit register in the Microprocessor, which holds the address of the top of the stack.
What is Program counter? - Program counter holds the address of either the first byte of the next instruction to be fetched for execution or the address of the next byte of a multi byte instruction, which has not been completely fetched. In both the cases it gets incremented...
Wednesday, 28 September 2011
Tuesday, 27 September 2011
Logical Questions: You are standing next to a well, and you have two jugs. ....
You are standing next to a well, and you have two jugs. One jug has a content of 3 liters and the other one has a content of 5 liters. How can you get just 4 liters of water using only these two jugs?
Solution 1: Fill the 5 liter jug. Then fill the 3 liter jug to the top with water from the 5 liter jug. Now you have 2 liters of water in the 5 liter jug. Dump out the 3 liter jug and pour what's in the 5 liter jug into the 3 liter jug. Then refill the 5 liter jug, and fill up the 3 liter jug to the top. Since there were already 2 liters of water in the 3 liter jug, 1 liter is removed from the 5 liter jug, leaving 4 liters of water in the 5 liter jug. Solution 2: Fill the 3 liter jug and pour it into the 5 liter jug. Then refill the 3 liter jug and fill up the 5 liter jug to the top....
TCS Placement Paper On January 2010
Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4
st1\:*{behavior:url(#ieooui) }
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
...
Joyce has bought ten trees for her garden. She wants to plant these trees in five rows, with four trees in each row. The Question :How must Joyce plant the trees?
Joyce has bought ten trees for her garden. She wants to plant these trees in five rows, with four trees in each row. The Question :How must Joyce plant the trees?
Answer:
Plants are placed in following way
****
****
**
**
horizontal 2 rows
vertical 2 rows
digonal 1 row with four plants in each ...
A banana plantation is located next to a desert. The plantation owner has 3000 bananas that he wants to transport to the market by camel, across a 1000 kilometer stretch of desert. The owner has only one camel, which carries a maximum of 1000 bananas at any moment in time, and eats one banana every kilometre it travels. What is the largest number of bananas that can be delivered at the market?
A banana plantation is located next to a desert. The plantation owner has 3000 bananas that he wants to transport to the market by camel, across a 1000 kilometer stretch of desert. The owner has only one camel, which carries a maximum of 1000 bananas at any moment in time, and eats one banana every kilometre it travels. What is the largest number of bananas that can be delivered at the market?
Answer:
750 bananas !!!
First of all travel 500 km (3 times)
first take 1000 bananas and put in half way and return again take 1000 banana drop in half way return and again take 1000 banana and drop it half way, i.e., at 500 km distance.
so now you have 1500 banana left at half distance.
Now take 1000 bananas and travel 250 km, drop it there and return and take 500 remaining bananas and...
Saturday, 17 September 2011
30 simple Java questions
How could Java classes direct program messages to the system console, but error messages, say to a file?
The class System has a variable out that represents the standard output, and the variable err that represents the standard error device. By default, they both point at the system console. This how the standard output could be re-directed: Stream st =
new Stream (new
FileOutputStream ("techinterviews_com.txt"));
System.setErr(st);
System.setOut(st);
What’s the difference between an interface and an abstract class?
An abstract class may contain code in method bodies, which is not allowed in an interface. With abstract classes, you have to inherit your class from it and Java does not allow multiple inheritance. On the other hand, you can implement multiple interfaces in your class.
...
C interview questions and answers
What will print out? main()
{
char *p1=“name”;
char *p2;
p2=(char*)malloc(20);
memset (p2, 0, 20);
while(*p2++ = *p1++);
printf(“%sn”,p2);
}
Answer:empty string.
What will be printed as the result of the operation below:
main()
{
int x=20,y=35;
x=y++ + x++;
y= ++y + ++x;
printf(“%d%dn”,x,y); } Answer : 5794
What will be printed as the result of the operation below:
main()
{
int x=5;
printf(“%d,%d,%dn”,x,x<...
Thursday, 8 September 2011
Solved Aptitude Questions
1. A man starts his walking at 3PM from point A, he walks at the rate of 4km/hr in plains and 3km/hr in hills to reach the point B. During his return journey he walks at the rate of 6km/hr in hills and 4km/hr in plains and reaches the point A at 9PM.What is the distance between A and B?Ans: 12kmSolution:T1+T2=6
T1-time for forward journey,
T2-time for return journey
D1+D2=forward /return distance
D1-distance in plains
D2-distance in hills
D1/4 +D2/3=T1 (forward time)
D1/4 +D2/6=T2 (return time)
Adding we will get D1+D2=12 km
2. A boy asks his father, " what is the age of grand father?". Father replied " He is x years old in x^2 years", and also said, "we are talking about 20th century". what is the year of birth of grand father?Ans: 18923. A boy travels in a scooter after covering 2/3rd...