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

The digital computer was developed primarily in

A) USA B) UK
C) Russia D) Japan
 
Answer & Explanation Answer: A) USA

Explanation:

A digital computer accepts, processes and outputs data in digitized forms. The digital computer was developed primarily in Unites States of America.

Report Error

View Answer Report Error Discuss

19 6777
Q:

The oxidation number of Cr in K2Cr2O7 is

A) +6 B) -5
C) +3 D) -4
 
Answer & Explanation Answer: A) +6

Explanation:

We will rewrite the formula as an equation.

2K + 2Cr + 7O = 0

The zero comes from there being no overall charge on the compound.

Each oxidation number is represented by the element's symbol.

Since this compound is not a peroxide or superoxide, the oxidation value for O is -2

K being in group 1 has a +1 charge and therefore has an oxidation number of K is +1

Now, by putting known values in we have:

2(+1) + 2(Cr) + 7(-2) = 0

2 + 2Cr -14 = 0

2Cr = +12

Cr = +6.

Report Error

View Answer Report Error Discuss

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

13 6777
Q:

Which among the following is NOT a member of any of the two Houses of the Indian Parliament?

 

I. Prime Minister of India

II. Finance Minister of India

III. President of India

 

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

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Politics
Exam Prep: Bank Exams

0 6776
Q:

Syadvad is a doctrine of

A) Lokayatism B) Saivism
C) Jainism D) Vaishnavism
 
Answer & Explanation Answer: C) Jainism

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History

7 6774
Q:

How did the Lakshadweep islands of group originate?

 

A) Volcanic origin B) Soil Deposition
C) Coral origin D) No option is correct
 
Answer & Explanation Answer: C) Coral origin

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography
Exam Prep: Bank Exams

0 6774
Q:

What is the currency of Indonesia?

A) rupiah B) dinar
C) rangit D) riyal
 
Answer & Explanation Answer: A) rupiah

Explanation:

Currency of Indonesia is rupiah

Report Error

View Answer Report Error Discuss

Filed Under: General Awareness

30 6773
Q:

Choose the word which is nearly opposite in meaning to the given word:-

Refractory

A) Refreshing B) Burdensome
C) Privileged D) Manageable
 
Answer & Explanation Answer: D) Manageable

Explanation:

Refractorymeans unmanageablewhich is nearly opposite to manageable.Refreshing means revivifyingBurdensome means troublesomePrivileged means advantage

Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams

0 6768