Questions

Q:

What would be the output of the following program?

main()

{

   struct emp

   {

        char *n;

        int age;

   };

   struct emp e1 = { "Dravid", 23};

   struct emp e2 = e1;

   strupr (e2.n);

   printf ("\n%s",e1.n);

}

Answer

DRAVID


When a structure is assigned, passed, or returned, the copying is done monolithically. This means that the copies of any pointer fields will point to the same place as the original. In other words, anything pointed to is not copied. Hence, on changing the name through e2.n it automatically changed e1.n

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2654
Q:

Head Quaters of NATO is located in 

A) Newyork B) Brussels
C) Alaska D) California
 
Answer & Explanation Answer: B) Brussels

Explanation:

Head Quaters of NATO is located in Brussels

Report Error

View Answer Report Error Discuss

Filed Under: World Organisations

5 2654
Q:

In the aggregate expenditures model, it is assumed that investment

in_the_aggregate_expenditures_model_it_is_assumed_that_investment1553493949.jpg image

A) does not change when real GDP changes B) does not respond to changes in interest rates
C) changes by less in percentage terms than changes in real GDP D) automatically changes in response to changes in real GDP
 
Answer & Explanation Answer: A) does not change when real GDP changes

Explanation:

In the aggregate expenditures model, it is assumed that investment does not change when real GDP changes.

 

  • The aggregate expenditure is the sum of all the expenditures undertaken in the economy by the factors during a specific time period.

 

  • The aggregate expenditure determines the total amount that firms and households plan to spend on goods and services at each level of income.
Report Error

View Answer Report Error Discuss

Filed Under: Indian Economy
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

0 2654
Q:

Which of these is ATP?

A) 3 Phosphate groups attached to chromosome attached to Adenine B) 3 Phosphate groups attached to a Ribose attached to Adenine
C) 3 Phosphate groups attached to a Ribose attached to Thymine D) None of the above
 
Answer & Explanation Answer: B) 3 Phosphate groups attached to a Ribose attached to Adenine

Explanation:

ATP is a Adenosine Triphosphate.

 

ATP is 3 Phosphate groups attached to a Ribose attached to Adenine.

Report Error

View Answer Report Error Discuss

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

4 2653
Q:

Which gas is not produced by volcanic eruptions?

A) Methane B) carbon dioxide
C) sulfur dioxide D) hydrochloric acid
 
Answer & Explanation Answer: A) Methane

Explanation:

Many toxic gases along with water vapour are emitted in vocanic eruptions. All such toxic gases include hydrochloric acid, sulfur dioxide, carbon dioxide, hydrogen sulfide and carbon monoxide. Methane is not produced in the volcanic eruptions.

which_gas_is_not_produced_by_volcanic_eruptions1559201445.jpg image

Report Error

View Answer Report Error Discuss

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

2 2653
Q:

Foliated rocks are distinguished by

A) layers B) minerals
C) colors D) names
 
Answer & Explanation Answer: A) layers

Explanation:

Foliated rocks are distinguished by layers.

Report Error

View Answer Report Error Discuss

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

2 2653
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 2653
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 2652