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

Which state will become the first Indian state to introduce Universal Basic Income ?

A) Sikkim B) Telangana
C) Andhra Pradesh D) Manipur
 
Answer & Explanation Answer: A) Sikkim

Explanation:
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 2428
Q:

The mass of a mole of NaCl is the

A) 58.44 gm/mol B) 57.25 gm/mol
C) 56.31 gm/mol D) 59.14 gm/mol
 
Answer & Explanation Answer: A) 58.44 gm/mol

Explanation:

To get the mass of a mole of NaCl, we need to add the molar atomic weights of the individual elements i.e, Na and Cl

Atomic weights of Na = 22.99 gm/mol  Cl = 35.45 gm/mol

 

Now, mass of a mole of NaCl = 22.99 + 35.45 = 58.44 gm/mol.

Report Error

View Answer Report Error Discuss

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

0 2427
Q:

Who is the co-founder of Hotmail?

Answer

Sabeer Bhatia

Report Error

View answer Workspace Report Error Discuss

4 2427
Q:

Who wrote the book "Ignited Minds"?

A) Vikram Seth B) APJ Abdul Kalam
C) Arundhati Roy D) Manmohan Singh
 
Answer & Explanation Answer: B) APJ Abdul Kalam

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Politics
Exam Prep: Bank Exams

1 2427
Q:

What is the major source of dietary sulfur?

A) Proteins B) Carbohydrates
C) Mineral salts D) All of the above
 
Answer & Explanation Answer: A) Proteins

Explanation:

 Protein cantaining foods are the major source of dietary sulfur. Foods like eggs are rich in sulfur content.

Report Error

View Answer Report Error Discuss

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

4 2426
Q:

The UNESCO World Heritage Site, Victoria Memorial Hall is located in which Indian city?

A) Mumbai B) Chennai
C) Kolkata D) Delhi
 
Answer & Explanation Answer: C) Kolkata

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography
Exam Prep: Bank Exams

6 2426
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 2425