Questions

Q:

Write a c program for quick sort.

Answer

#include<stdio.h>

void quicksort(int [10],int,int);

int main(){
  int x[20],size,i;

  printf("Enter size of the array: ");
  scanf("%d",&size);

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

  quicksort(x,0,size-1);

  printf("Sorted elements: ");
  for(i=0;i<size;i++)
    printf(" %d",x[i]);

  return 0;
}

void quicksort(int x[10],int first,int last){
    int pivot,j,temp,i;

     if(first<last){
         pivot=first;
         i=first;
         j=last;

         while(i<j){
             while(x[i]<=x[pivot]&&i<last)
                 i++;
             while(x[j]>x[pivot])
                 j--;
             if(i<j){
                 temp=x[i];
                  x[i]=x[j];
                  x[j]=temp;
             }
         }

         temp=x[pivot];
         x[pivot]=x[j];
         x[j]=temp;
         quicksort(x,first,j-1);
         quicksort(x,j+1,last);

    }
}

Output:
Enter size of the array: 5
Enter 5 elements: 3 8 0 1 2
Sorted elements: 0 1 2 3 8

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2668
Q:

How many non regional members are there in the African development Bank

A) 24 B) 23
C) 25 D) 27
 
Answer & Explanation Answer: C) 25

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World Organisations

1 2668
Q:

What is hard disk and what is its purpose?

Answer

Hard disk is the secondary storage device, which holds the data in bulk, and it holds the data on the magnetic medium of the disk.Hard disks have a hard platter that holds the magnetic medium, the magnetic medium can be easily erased and rewritten, and a typical desktop machine will have a hard disk with a capacity of between 10 and 40 gigabytes. Data is stored onto the disk in the form of files.

Report Error

View answer Workspace Report Error Discuss

0 2665
Q:

UNIVAC is

A) Universal Automatic Computer B) Universal Array Computer
C) Unvalued Automatic Computer D) Unique Automatic Computer
 
Answer & Explanation Answer: A) Universal Automatic Computer

Explanation:
Report Error

View Answer Report Error Discuss

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

3 2665
Q:

Autocorrect was originally designed to replace

A) Misspelled words B) Grammatically incorrect
C) Repetitive words D) All of the above
 
Answer & Explanation Answer: A) Misspelled words

Explanation:

autocorrect_was_originally_designed_to_replace1561613833.jpg image

 

Autocorrect was originally designed to replace Misspelled words. Its purpose is as part of the spell checker to correct common spelling or typing errors, saving time for the user. It is commonly found in word processors and text editing interfaces for smartphones, computers, etc.

Report Error

View Answer Report Error Discuss

6 2664
Q:

Student specific scholarships are awarded to students who

A) have impressive academic achievements B) are members of a certain group
C) have impressive athletic accomplishments D) demonstrates a specific skill
 
Answer & Explanation Answer: A) have impressive academic achievements

Explanation:

A scholarship is an award of financial aid that helps students to continue their studies further by a popular donor or from the scheme of the government. Student specific scholarships are awarded to students who have impressive academic achievements.

Report Error

View Answer Report Error Discuss

Filed Under: Honours and Awards
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

3 2664
Q:

Phage typing is based on the fact that

A) viruses cause disease B) bacteria and viruses are related
C) bacteria are destroyed by viruses D) bacterial viruses attack specific cells
 
Answer & Explanation Answer: D) bacterial viruses attack specific cells

Explanation:

Phage typing is based on the fact that bacterial viruses attack specific cells. Phage typing is a method used for detecting single strains of bacteria. It is used to trace the source of outbreaks of infections. 

Report Error

View Answer Report Error Discuss

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

1 2664
Q:

Which is the heaviest metal among the following?

A) Gold B) Silver
C) Iron D) Copper
 
Answer & Explanation Answer: A) Gold

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Chemistry

1 2663