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

Project Management - Introduction

What is program Management?

Answer

A program is a group of related projects managed in a coordinated way to obtain benefits and  control  not available from managing them individually. Programs may include elements of related work outside of the scope of the discrete projects in the program.


For example:


A New car model program can be broken up into projects  for the design and upgrades of each major component (transmission, engine, interior, exterior) while the ongoing manufacturing occurs on the assembly line

Report Error

View answer Workspace Report Error Discuss

0 2462
Q:

Four pairs of words are given. Find the odd one out.

 

A) 5th June : World Environment Day B) 22nd April : Earth Day
C) 22nd March : World Water Day D) 22nd May : World Sparrow Day
 
Answer & Explanation Answer: D) 22nd May : World Sparrow Day

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Important Days and Years
Exam Prep: Bank Exams

1 2462
Q:

Which legendary cricketer has made his debut as a commentator in the opening match of World Cup 2019?

A) Sachin Tendulkar B) Saurav Ganguly
C) Virendar Sehwag D) Rahul Dravid
 
Answer & Explanation Answer: A) Sachin Tendulkar

Explanation:
Report Error

View Answer Report Error Discuss

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

3 2461
Q:

Crack the following Logical WordPuzzle ?

21686498_1422856854488081_4594340323462201417_n1506331278.jpg image

Answer

Maps.

Report Error

View answer Workspace Report Error Discuss

Subject: Word Puzzles Exam Prep: Bank Exams , CAT , GRE , TOEFL
Job Role: Bank Clerk

10 2461
Q:

Which structure is not part of the Endomembrane System?

A) Chloroplast B) Plasma membrane
C) Nuclear envelope D) Golgi apparatus
 
Answer & Explanation Answer: A) Chloroplast

Explanation:

The endomembrane system is composed of the different membranes that are suspended in the cytoplasm within a eukaryotic cell. These membranes divide the cell into functional and structural compartments or organelles. In eukaryotes, the organelles of the endomembrane system include the nuclear membrane, the endoplasmic reticulum, the Golgi apparatus, lysosomes, vesicles, endosomes and the cell membrane, among others.

Report Error

View Answer Report Error Discuss

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

2 2461
Q:

At what temperature (in Fahrenheit) pure water freezes?

A) 0 B) 17
C) 32 D) 39
 
Answer & Explanation Answer: C) 32

Explanation:

32oFWe know that T(°F) = T(°C) × 1.8 + 3232(°F) = 0(°C)

Report Error

View Answer Report Error Discuss

Filed Under: Physics
Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Bank PO , Database Administration , IT Trainer

10 2461
Q:

Which of the following is the best conductor of electricity?

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

Explanation:

silver is the best conductor of electricity.

When compared to remaining 3 metals, as Silver having more number of free electrons in its valency shell it is the good conductor of electricity.

Conductors Thermal Conductivity @ 25degree C

Silver --- 429
Copper --- 401
Gold --- 310
Aluminium --- 250

Report Error

View Answer Report Error Discuss

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

5 2460