Questions

Q:

Write a c program for linear search.

Answer

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

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

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

    printf("Enter the elements of the array: ");
    for(i=0;i<=n-1;i++){
         scanf("%d",&a[i]);
    }

    printf("Enter the number to be search: ");
    scanf("%d",&m);
    for(i=0;i<=n-1;i++){
         if(a[i]==m){
             c=1;
             break;
         }
    }
    if(c==0)
         printf("The number is not in the list");
    else
         printf("The number is found");

    return 0;
}

Sample output:
Enter the size of an array: 5
Enter the elements of the array: 4 6 8 0 3
Enter the number to be search: 0
The number is found

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

2 6799
Q:

Which of the statements given below are correct?


A) In 2017 Pro Kabaddi League, Sandeep Narwal played for Bengaluru Bulls.


B) In 2017, Dani Pedrosa raced in MotoGP for Honda.


C) In 2017, Glenn Maxwell captained the IPL team Kolkata Knight Riders.

 

A) Only B B) Both A and B
C) Both A and C D) A, B and C
 
Answer & Explanation Answer: B) Both A and B

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Sports
Exam Prep: Bank Exams

1 6795
Q:

Who is the Indian Classical dancer credited with the first female dancer to learn Chhau form ?

Answer

Sonal Mansingh

Report Error

View answer Workspace Report Error Discuss

9 6794
Q:

Paper Currency Act was enacted by British Government of India in which year ?

 

A) 1870 B) 1861
C) 1858 D) 1865
 
Answer & Explanation Answer: B) 1861

Explanation:

Paper Currency Act was enacted by British Government of India in 1861.

 

Report Error

View Answer Report Error Discuss

Filed Under: Indian History
Exam Prep: Bank Exams

1 6793
Q:

Baking soda is used ______.

 

I. for making baking powder

II. in soda-acid fire extinguishers

III. to neutralize excess acid in the stomach

 

A) Only I and II B) Only I and III
C) Only II and III D) All I, II and III
 
Answer & Explanation Answer: D) All I, II and III

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Chemistry
Exam Prep: AIEEE , Bank Exams

2 6792
Q:

Which sample of matter is a mixture?

A) KBr (S) B) NaCl (L)
C) K (S) D) NaCl (Aq)
 
Answer & Explanation Answer: D) NaCl (Aq)

Explanation:

Mixtures are combination of two or more substances physically which can be separated in to the original.

Matter can be breakdown into two categories. 

1) Pure substances 

2) Mixtures

 

Here in the given options, options A, B, C are pure substances as they are indicated as S & L in brackets. Option D) is an aqueous solution, that can be dissolved in water.

Report Error

View Answer Report Error Discuss

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

7 6791
Q:

Match the characteristics with their market structure:

(a) demand will tend to be inelastic
(b) Firm has control over quantity of output but it must take into account reactions of competitors

 

A) (a) Pure Monopoly, (b) Oligopoly B) (a) Pure Monopoly, (b) Monopolistic Competition
C) (a) Pure Competition, (b) Oligopoly D) (a) Monopolistic Competition, (b) Pure Competition
 
Answer & Explanation Answer: A) (a) Pure Monopoly, (b) Oligopoly

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Economy
Exam Prep: Bank Exams

1 6786
Q:

 A benefit of the three-tier architecture is which of the following?

A) New modules can be built to support specific business needs B) Performance improves for compiled SQL statements
C) Results in a thinner client and database server D) All of the above.
 
Answer & Explanation Answer: A) New modules can be built to support specific business needs

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Database

1 6785