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 2880
Q:

Which among the following countries , occupies the largest chunk of the Sunderbans Delta?

A) Bangladesh B) Burma
C) India D) Thailand
 
Answer & Explanation Answer: A) Bangladesh

Explanation:

Sunderbans is the name given to the dense impenetrable  tidal/ mangrove forest of Ganges-Brahmaputra delta because of abundant sundari trees found here.

Report Error

View Answer Report Error Discuss

Filed Under: World Geography

1 2879
Q:

5 Digits Number?

What 5-digit number has the following features:

If we put the numeral 1 at the beginning, we get a number three times smaller than if we put the numeral 1 at the end of the number.

Answer

We can make an equation:


3(100000 + x) = 10x+1


(Why? Well, adding 100000 puts a 1 at the front of a five-digit number, and multiplying by 10 and adding 1 puts a 1 at the end of a number)


Solving this gives:


10x+1 = 3(100000 + x)
10x+1 = 300000 + 3x
10x = 299999 + 3x
7x = 299999
x = 299999/7 = 42857


The answer is 42857 (142857 is three times smaller than 428571).

Report Error

View answer Workspace Report Error Discuss

9 2879
Q:

Which among the following crop is a major Rabi Crop of India?

A) Bitter gourd B) Cotton
C) Turmeric D) Barley
 
Answer & Explanation Answer: D) Barley

Explanation:

A major Rabi Crop of India is wheat and barley in second place.

Report Error

View Answer Report Error Discuss

8 2879
Q:

Voice in literary nonfiction refers to

A) description that appeals to the five senses B) the overall presence of a personality behind the text
C) the attitude that the author or narrator has toward the subject or reader D) nonfiction that uses elements and devices common in fictional stories
 
Answer & Explanation Answer: A) description that appeals to the five senses

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: AIEEE , Bank Exams , CAT , GRE , TOEFL
Job Role: Analyst , Bank Clerk , Bank PO

3 2879
Q:

Ragini is a popular form of folk song belonging to the State of ___________

A) Kashmir B) Kerala
C) Haryana D) Manipur
 
Answer & Explanation Answer: C) Haryana

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Culture
Exam Prep: Bank Exams

6 2878
Q:

Laconic most nearly means

A) Talkative B) Wordy
C) Brief D) Long
 
Answer & Explanation Answer: C) Brief

Explanation:

Laconic means using only few words in his/her speech or while talking.

In the given options, talkative, wordy and long are all opposite to laconic and brief is the only word which is similar in meaning of laconic.

Report Error

View Answer Report Error Discuss

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

1 2878
Q:

Select the correct statement about cellular respiration?

A) All the carbon atoms in glucose ultimately incorporated during cellular respiration into carbon dioxide molecule B) All the carbon atoms in glucose ultimately incorporated during cellular respiration into NADH molecule
C) All the carbon atoms in glucose ultimately incorporated during cellular respiration into ATP molecule D) All the carbon atoms in glucose ultimately incorporated during cellular respiration into water molecule
 
Answer & Explanation Answer: A) All the carbon atoms in glucose ultimately incorporated during cellular respiration into carbon dioxide molecule

Explanation:

All the carbon atoms in glucose ultimately incorporated during cellular respiration into carbon dioxide molecules.

Report Error

View Answer Report Error Discuss

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

2 2877