Questions

Q:

Write a c program for binary search.

Answer

#include<stdio.h>
int main(){

    int a[10],i,n,m,c=0,l,u,mid;

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

    printf("Enter the elements in ascending order: ");
    for(i=0;i<n;i++){
         scanf("%d",&a[i]);
    }

    printf("Enter the number to be search: ");
    scanf("%d",&m);

    l=0,u=n-1;
    while(l<=u){
         mid=(l+u)/2;
         if(m==a[mid]){
             c=1;
             break;
         }
         else if(m<a[mid]){
             u=mid-1;
         }
         else
             l=mid+1;
    }
    if(c==0)
         printf("The number is not found.");
    else
         printf("The number is found.");

    return 0;
}

Sample output:
Enter the size of an array: 5
Enter the elements in ascending order: 4 7 8 11 21
Enter the number to be search: 11
The number is found.

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2629
Q:

One of the following companies does have business interest in both oil and shipping sectors. Identify this.

A) Tata Group B) Reliance Group
C) Essar Group D) ONGC
 
Answer & Explanation Answer: C) Essar Group

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Business Awareness

6 2629
Q:

Oligopolistic industries are characterized by

A) a few dominant firms and no barriers to entry B) a large number of firms and low entry barriers
C) a few dominant firms and substantial entry barriers D) a few dominant firms and low entry barriers
 
Answer & Explanation Answer: C) a few dominant firms and substantial entry barriers

Explanation:

Oligopoly is market structure where a small number of large firms are there. Oligopolistic industries are characterized by a few dominant firms and substantial entry barriers.

Report Error

View Answer Report Error Discuss

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

6 2629
Q:

What does destination scan mean?

A) The shipment has arrived at a UPS facility. B) The shipment has departed a UPS facility and is on its way to the next UPS facility.
C) The shipment has arrived at the local UPS facility responsible for final delivery. D) UPS has received the shipment.
 
Answer & Explanation Answer: C) The shipment has arrived at the local UPS facility responsible for final delivery.

Explanation:

Shipment movement information is captured each time a tracking label is scanned in the UPS delivery system. There may be several days between scans if the shipment is going cross-country or moving between countries.

 

Destination Scan: The shipment has arrived at the local UPS facility responsible for final delivery.

Arrival Scan: The shipment has arrived at a UPS facility.

Departure Scan: The shipment has departed a UPS facility and is on its way to the next UPS facility.

Origin Scan: UPS has received the shipment.

Report Error

View Answer Report Error Discuss

Filed Under: Marketing and Sales

0 2629
Q:

Energy stored in the nucleus of an atom is called

A) Nuclear energy B) Atomic energy
C) Potential energy D) Kinetic energy
 
Answer & Explanation Answer: A) Nuclear energy

Explanation:
Report Error

View Answer Report Error Discuss

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

1 2629
Q:

Who is the author of ' The Accidental Prime Minister - The Making and Unmaking of Manmohan Singh'

Answer

Sanjaya Baru

Report Error

View answer Workspace Report Error Discuss

3 2628
Q:

What is the purpose of the sigmoid colon?

Answer

Sigmoid colon or pelvic colon is a curved, S-shaped portion of the large intestine which is closest to the rectum and anus.


sigmoid_colon1532669660.jpg image


* It helps to transports fecal matter from the descending colon to the rectum and anus.


 


* It is the final segment of the colon.

Report Error

View answer Workspace Report Error Discuss

Subject: Biology Exam Prep: AIEEE , Bank Exams
Job Role: Analyst , Bank Clerk

1 2628
Q:

An increase in the quantity demanded means that

A) The demand curve shifted to right B) Price of the product has declined
C) Increase in consumer income D) All the above
 
Answer & Explanation Answer: D) All the above

Explanation:
Report Error

View Answer Report Error Discuss

1 2628