Questions

Q:

Write a c program for selection sort.

Answer

include<stdio.h>
int main(){

  int s,i,j,temp,a[20];

  printf("Enter total elements: ");
  scanf("%d",&s);

  printf("Enter %d elements: ",s);
  for(i=0;i<s;i++)
      scanf("%d",&a[i]);

  for(i=0;i<s;i++){
      for(j=i+1;j<s;j++){
           if(a[i]>a[j]){
               temp=a[i];
              a[i]=a[j];
              a[j]=temp;
           }
      }
  }

  printf("After sorting is: ");
  for(i=0;i<s;i++)
      printf(" %d",a[i]);

  return 0;
}

Output:
Enter total elements: 5
Enter 5 elements: 4 5 0 21 7
The array after sorting is:  0 4 5 7 21

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2447
Q:

Who described his policy of unification as one of 'blood and iron'?

A) Bismarck B) Napoleon
C) Mazzini D) Napoleon Bonaparte
 
Answer & Explanation Answer: A) Bismarck

Explanation:

With the failure of the revolution of 1848 to unify Germany, one phase in the struggle for unification came to an end. Now Germany was to be unified not into a democratic country by the efforts of revolutionaries but by the rulers into a militaristic empire. The leader of this policy Bismarck who belonged to a prussian aristocratic family. He wanted to preserve the predominance of the landed aristocrats and the army in the united German state and to achieve the unification of Germany under the leadership of Prussian monarchy. He described his policy of unification as one of 'blood and iron'. The policy of 'blood and iron' meant a policy of war.

Report Error

View Answer Report Error Discuss

Filed Under: World History

2 2447
Q:

St Andreas Fault passes close to the US city of

A) Los Angeles B) New Orleans
C) Hollywood D) San Francisco
 
Answer & Explanation Answer: D) San Francisco

Explanation:

A devastating  series of earthquakes in 1906 ruined the city completely and its presence is a constant remainder of the past and a threat of repetition in future.

Report Error

View Answer Report Error Discuss

Filed Under: World Geography

0 2447
Q:

What is Executive in Windows NT?

Answer

In Windows NT, executive refers to the operating system code that runs in kernel mode.

Report Error

View answer Workspace Report Error Discuss

1 2446
Q:

Which planet is known as the Morning Star or the Evening Star?

A) Jupiter B) Venus
C) Mercury D) Saturn
 
Answer & Explanation Answer: B) Venus

Explanation:

Venus planet is known as the Morning Star or the Evening Star.

Report Error

View Answer Report Error Discuss

5 2446
Q:

All the organisms on your campus make up

A) a community B) a group
C) an ecosystem D) None of the above
 
Answer & Explanation Answer: A) a community

Explanation:

All the organisms on your campus make up a community.

Report Error

View Answer Report Error Discuss

Filed Under: General Science
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

2 2445
Q:

Which of these groups is the smallest level of classification?

A) Phylum B) Family
C) Kingdom D) Species
 
Answer & Explanation Answer: C) Kingdom

Explanation:

Kingdom is the smallest level of classification.

 

The level of classification from largest to smallest is :

* Domain

* Kingdom

* Phylum

* Class

* Order

* Family

* Genus

* Species

Report Error

View Answer Report Error Discuss

Filed Under: General Science
Exam Prep: AIEEE , Bank Exams
Job Role: Analyst , Bank Clerk , Bank PO

1 2444
Q:

The term photon refers to

A) light ray B) sub atomic particle
C) radiation D) None of the above
 
Answer & Explanation Answer: B) sub atomic particle

Explanation:

The photon is a type of elementary particle, the quantum of the electromagnetic field including electromagnetic radiation such as light, and the force carrier for the electromagnetic force. The photon has zero rest mass and always moves at the speed of light within a vacuum.

Report Error

View Answer Report Error Discuss

Filed Under: Physics
Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Analyst , Bank Clerk , Bank PO

2 2444