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

How would you obtain segment and offset addresses from a far address of a memory location?

Answer

#include "dos.h"


main()


{


    Char far *scr = ( char far *) 0xB8000000;


    Char *seg, *off;


    Seg = (char *) FP_SEG ( scr );


    Off = ( char *) FP_OFF ( scr );


}


 

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2426
Q:

Which among the following is not correctly matched?

A) Parachute: W H carothers B) Barometer: Torricelli
C) Cells: Robert Hooke D) X- Ray: W Roentgen
 
Answer & Explanation Answer: A) Parachute: W H carothers

Explanation:
Report Error

View Answer Report Error Discuss

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

1 2426
Q:

Which of the following is not an allotrope of carbon?

A) Diamond B) Graphene
C) Ethylene D) Buckminsterfullerene
 
Answer & Explanation Answer: C) Ethylene

Explanation:

Allotropes are different structural modifications of an element, that is, each of two or more different physical forms in which an element can exist.

 

Carbon is capable of forming many allotropes due to its valency. Well-known forms of carbon include charcoal, diamond, graphite, buckminsterfullerene and graphene.

 

Hence, Ethylene is not an allotrope of Carbon.

Report Error

View Answer Report Error Discuss

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

2 2426
Q:

The oldest oil refinery in India is at

A) Haldia B) Digboi
C) Rajpur D) Noonmati
 
Answer & Explanation Answer: B) Digboi

Explanation:

Digboi, in Assam is where the oldest oil refinery in India. It was build in 1901.

Report Error

View Answer Report Error Discuss

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

3 2426
Q:

Missing letters puzzle

Answer

Answer:  U


Explanation:  Start with the D on the outer left of the diagram, and move clockwise around the outer segments, then start on the N anti-clockwise around the inner segments. Letters advance through the alphabet in steps of 3, then 4, 5, and 6, repeating this sequence.

Report Error

View answer Workspace Report Error Discuss

5 2426
Q:

For how many months is a cheque valid from the date of issue?

A) 1 month B) 2 months
C) 3 months D) 6 months
 
Answer & Explanation Answer: C) 3 months

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: Bank Exams

31 2426
Q:

The preamble to the constitution does not specify providing for

A) economic equity B) domestic tranquility
C) common defense D) justice
 
Answer & Explanation Answer: A) economic equity

Explanation:

The preamble to the constitution does not specify providing for economic equity.

Report Error

View Answer Report Error Discuss

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

6 2426