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

Iveco, Part of the Fiat group, holds 15 per cent stake in an Indian automobile company. The  company in the question is 

A) AShok Leyland B) Hindustan Motors
C) Tata Motors D) Eitcher
 
Answer & Explanation Answer: A) AShok Leyland

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Business Awareness

7 2907
Q:

Alcohol is a stimulant. true or false

A) TRUE B) FALSE
Answer & Explanation Answer: B) FALSE

Explanation:

Alcohol is a drug.

Report Error

View Answer Workspace Report Error Discuss

Subject: Chemistry
Exam Prep: AIEEE , Bank Exams
Job Role: Analyst , Bank Clerk , Bank PO

2 2907
Q:

Which one of the following National Highways is the longest

A) NH-2 B) NH-7
C) NH-8 D) NH-15
 
Answer & Explanation Answer: B) NH-7

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Economy

4 2906
Q:

Who Built The Suez Canal?

A) Theodore Roosevelt B) Ferdinand de Lesseps
C) Robert Mills D) James Hoban
 
Answer & Explanation Answer: B) Ferdinand de Lesseps

Explanation:

The Suez Canal in Egypt, is a 101 mile long canal that connects the Mediterranean Sea with the Gulf of Suez, a northern branch of the Red Sea. It was built in 1869 by Ferdinand de Lesseps.

Report Error

View Answer Report Error Discuss

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

6 2906
Q:

Thesaurus tool in MS word is used for

A) Translate B) Synonyms and Antonyms words
C) Spelling suggestions D) None of the above
 
Answer & Explanation Answer: B) Synonyms and Antonyms words

Explanation:
Report Error

View Answer Report Error Discuss

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

7 2905
Q:

Which of the following Indian Universities has topped the list of country's official higher education rankings, recently announced by the HRD Ministry ? 

A) Jawaharlal Nehru University B) Banaras Hindu University
C) IISc-Bengaluru D) Delhi University
 
Answer & Explanation Answer: C) IISc-Bengaluru

Explanation:

The Indian Institute of Sciences (IISc)- Bengaluru has topped the list of best universities of country's official higher education rankings, recently announced by the HRD Ministry.

Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: Bank Exams
Job Role: Bank Clerk , Bank PO

1 2904
Q:

Which of the following commands will allow a Linux on iSeries administrator to quickly scan backup tapes for files saved via a tar command on a Linux system?

A) The Linux command mt B) The Linux command cpio
C) The OS/400 command RST option(*print) D) The OS/400 command DSPTAP option(*savrst)
 
Answer & Explanation Answer: B) The Linux command cpio

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: IBM Certification

1 2904