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:

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 6779
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:

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:

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:

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:

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 6768