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 2658
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 2657
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 2656
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 2656
Q:

Which statement regarding the era of Reconstruction is FALSE?

A) the 14th Amendment made African-Americans citizens of the U.S. B) the 13th Amendment outlawed slavery in all American states
C) federal law was changed to abolish slavery in states where it still existed D) state laws and customs upheld the constitutional amendments
 
Answer & Explanation Answer: D) state laws and customs upheld the constitutional amendments

Explanation:
Report Error

View Answer Report Error Discuss

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

2 2656
Q:

Galvanised iron sheets have a coating of

A) Aluminium B) Copper
C) Zinc D) None of the above
 
Answer & Explanation Answer: C) Zinc

Explanation:

Galvanised iron sheets have a coating of zinc.

Galvanised_iron_sheets_have_a_coating_of1552913417.jpg image 

Report Error

View Answer Report Error Discuss

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

6 2655
Q:

What is the relationship between Resistivity and Conductivity?

Answer

Resistivity :


Resistivity is a measure of the resistance to the flow of electrons. 


Conductivity :


Conductivity is just the inverse of resistivity, σ = 1/ρ, where σ is conductivity and ρ is resistivity.


 


Example:


Think of a pipe and water, the bigger the pipe, the easier water can flow and thus the lower the resistance. 

Report Error

View answer Workspace Report Error Discuss

Subject: Physics Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Analyst , Bank Clerk , Bank PO , IT Trainer

3 2655
Q:

India's 1st district cooling system will come up in which city?

A) Amaravathi B) Hyderabad
C) Bangaluru D) Noida
 
Answer & Explanation Answer: A) Amaravathi

Explanation:

District cooling system is a well known and energy efficient technology adopted across the world. India's 1st district cooling system will come up in the green city Amaravathi, the capital city of Andhra Pradesh state.

India’s_1st_district_cooling_system_will_come_up_in_which_city1550731233.jpg image

District cooling system (DCS) distributes thermal energy in the form of chilled water from a central source to multiple buildings through a network of underground pipes for use in space cooling. The cooling or heat rejection is usually provided from a central cooling plant, thus eliminating the need for separate systems in individual buildings.

Report Error

View Answer Report Error Discuss

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

1 2655