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

Why are commercial advertisements made?

A) To convince the viewer to buy a product B) To confuse the viewer about the different products in market
C) To dissuade the viewer from buying a product D) To highlight the flaws of a product
 
Answer & Explanation Answer: A) To convince the viewer to buy a product

Explanation:

Commercial advertisements are created for the purpose of raising the awareness of the public on a company's products or services.

 

* It is very important for a business to have its goods and services known to the public.

 

* It can greatly boost its sales by attracting more csutomers which in effect helps a company grow and become successful.

Report Error

View Answer Report Error Discuss

Filed Under: Advertising and Media
Exam Prep: AIEEE
Job Role: Analyst

0 2380
Q:

What is the Purpose of a Project Charter?

Answer

 


1. Project Charter refers to a statement of objectives in a project.


 
2. It provides a preliminary delineation of roles and responsibilities, outlines the project objectives, identifies the main stakeholders, and defines the authority of the project manager.


 
3. It serves as a reference of authority for the future of the project. The terms of reference are usually part of the project charter.

Report Error

View answer Workspace Report Error Discuss

5 2380
Q:

The chief constituent of gobar gas is

A) Methane B) Carbon dioxide
C) Ethane D) Hydrogen
 
Answer & Explanation Answer: A) Methane

Explanation:
Report Error

View Answer Report Error Discuss

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

4 2380
Q:

Convert the expression ((A + B) * C – (D – E) ^ (F + G)) to equivalent Prefix Notation

Answer

Prefix Notation:


^ - * +ABC - DE + FG

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

1 2379
Q:

The spring constant of a spring depends on its

A) length only B) material only
C) length and its diameter D) thickness, its diameter and its material
 
Answer & Explanation Answer: D) thickness, its diameter and its material

Explanation:

In dealing with a coil spring the spring constant will depend on the stiffness of the spring material, the thicknessof the wire from which the spring is wound and, diameterof the turns of the coil, the number of turns per unit length and the overall length of the spring.

Report Error

View Answer Report Error Discuss

Filed Under: Physics
Exam Prep: Bank Exams

3 2378
Q:

Who is the Richest investor as per March 2013?

Answer

Warren Edward Buffett(USA), chairman of Berkshire Hathaway, is the world's richest investor, estimated to be worth $53.5 billion as of march 2013.

Report Error

View answer Workspace Report Error Discuss

1 2378
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 2378