Questions

Q:

Write a c program for insertion sort.

Answer

#include<stdio.h>
int main(){

  int i,j,s,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=1;i<s;i++){
      temp=a[i];
      j=i-1;
      while((temp<a[j])&&(j>=0)){
      a[j+1]=a[j];
          j=j-1;
      }
      a[j+1]=temp;
  }

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

  return 0;
}

Output:
Enter total elements: 5
Enter 5 elements: 3 7 9 0 2
After sorting:  0 2 3 7 9

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2985
Q:

Ticks and mites are actually

A) Arachnids B) Insects
C) Myriapods D) Crustaceans
 
Answer & Explanation Answer: A) Arachnids

Explanation:
Report Error

View Answer Report Error Discuss

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

7 2985
Q:

The current infection control guidelines from the CDC are called

Answer

The current infection control guidelines from the CDC (The Centers for Disease Control and Prevention) are called Standard or Universal Precautions.

Report Error

View answer Workspace Report Error Discuss

Subject: General Science Exam Prep: AIEEE , Bank Exams
Job Role: Analyst , Bank Clerk

2 2985
Q:

In India, in the overall indexe of Industrial Production , the Indices of Eight Core Industries have a combined weight of 37.90%. Which of the following are among those Eight Core Industries?

1.Cement     2. Fertilizers      3.Natural gas     4. Refinery products     5. Textiles

A) 1 and 5 only B) 2, 3 and 4 only
C) 1, 2, 3 and 4 only D) 1, 2, 3, 4 and 5
 
Answer & Explanation Answer: C) 1, 2, 3 and 4 only

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Economy

1 2985
Q:

India's first-ever autism township will come up in?

A) Telangana B) West Bengal
C) Karnataka D) Gujarat
 
Answer & Explanation Answer: B) West Bengal

Explanation:

India's first-ever autism township will come up in West Bengal.

Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

2 2985
Q:

The only perennial river in Peninsular India is _____ .

A) Godavari B) Kaveri
C) Krishna D) Bhima
 
Answer & Explanation Answer: B) Kaveri

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography
Exam Prep: Bank Exams

1 2984
Q:

What is the world’s oldest surviving republic?

Answer

San Marino

Report Error

View answer Workspace Report Error Discuss

Subject: World History

5 2984
Q:

Which African countries are the members of the East African Development Bank

A) Kenya B) Tanzania
C) Uganda D) All the above
 
Answer & Explanation Answer: D) All the above

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World Organisations

3 2984