Saturday, 31 December 2011

What is an instruction set?


  • The complete collection of instructions that are understood by a CPU

  • Machine Code

  • Binary

  • Usually represented by assembly codes


Elements of an Instruction



  • Operation code (Op code)

  • Source Operand reference

  • Result Operand reference

  • Next Instruction Reference


Instruction Cycle State Diagram



Instruction Representation



  • In machine code each instruction has a unique bit pattern

Friday, 30 December 2011

Polymorphism in Java

Polymorphism means "any forms." In object-oriented programming, it refers to the capability of objects to react differently to the same method. Polymorphism can be implemented in the Java language in the form of multiple methods having the same name. Java code uses a late-binding technique to support polymorphism; the method to be invoked is decided at runtime.

Overloaded methods are methods that have the same name, but different argument lists. Overriding, on the other hand, occurs when a subclass method has the same name, same return type, and same argument list as the superclass method.

Overloading


As we mentioned, it is mandatory for overloaded methods to have the same names but different argument lists. The arguments may differ

APPSC Group-2 Previous Questions - 2

21. The local name of Mohenjodaro is

1. Mound of the Great                2. Mound of the living


3. Mound of the Survivor          4. Mound of the Dead


22. Name the ruler of the Kushan dynasty.

1. Kadphises I                          2. Ugrasena


3. Vikramaditya                          4. Pushyamitra


23. The title 'Vikramaditya' was assumed by

1. Ashoka                                      2. Kanishka


3. Samudragupta                        4. Chandragupta II


24. The great granary of the Harappan civilisation has been found at

1. Ropar           2. Harappa           3. Kalibangan        4. Mohenjodaro


25. When did Alexander invade India ?

Why Yoga ?

Yoga is a way of life and enables us to have multidimensional approach to life. The human body is not the aim of yoga but is considered means of going beyond physical form of body. Unbalanced state of cause and effect result in ill health. Equilibrium of two is the basic aim of Yoga. A healthy body, therefore may be called as the foundation of Yoga.

Yoga is both an art and science. It can alone save the modern man from personal determination and circumstantial frustration. In other words the practice of 'Yoga' postulates keeping the body healthy and the mind calm and peaceful. Health is our birth-right, and to remain healthy, it is not necessary to depend upon any health centre, physician or medication. It is entirely in our hands to keep healthy. However, in the present-day conditions keeping good health is

Thursday, 29 December 2011

Performance of Sorting or Searching

One of the chief concerns in searching and sorting is speed. Often, this concern is misguided, because the sort or search takes negligible time compared to the rest of the program. For most sorting and searching applications, you should use the easiest method available . If you later find that the program is too slow because of the searching or sorting algorithm used, you can substitute another method easily. By starting with a simple method, you haven’t invested much time and effort on code that has to be replaced.

One measure of the speed of a sorting or searching algorithm is the number of operations that must be performed in the best, average,

APPSC Group-1 Prelims Previous Questions

1. The hill ranges between Narmada and Tapti rivers are

1. Aravalli          2. Vindhya          3. Kalmur           4. Satpura


2. The Land of Thousand lakes is in

1. England          2. Finland        3. Canada           4. Korea


3. The violent and destructive tropical cyclones in China and Japan are known as

1. Hurricanes    2. Tornadoes        3. Typhoons    4. Willy-willies


4. 'Stalagmites and Stalactites' are the landforms formed due to

1. Wind              2. Glaciers              3. Rivers           4. Ground water


5. Jurala Project is situated in the district of

Wednesday, 28 December 2011

Frequently Asked Questions in Technical Round at MNCs like TCS, WIPRO, INFOSYS,..etc

Predict the output or error(s) for the following:


1)

main()

{

int i=1;


while (i<=5)


{


printf("%d",i);


if (i>2)


goto here;


i++;


}


}

fun()

{

here:


    printf("PP");


}

Answer:

Compiler error: Undefined label 'here' in function main


Explanation: