Questions

Q:

Why we use do-while loop in c?

Answer

It is also called as post tested loop. It is used when it is necessary to execute the loop at least one time. Syntax:

do {
Loop body
} while (Expression);

Example:

int main(){
    int num,i=0;  
    do{
         printf("To enter press 1\n");
         printf("To exit press  2");
         scanf("%d",&num);
         ++i;
         switch(num){
             case 1:printf("You are welcome\n");break;
             default : exit(0);
         }
    }
    while(i<=10);
    return 0;
}

Output: 3 3 4 4

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2080
Q:

In loading programs into memory, what is the difference between load-time dynamic linking and run-time dynamic linking?

Answer

For load-time dynamic linking: Load module to be loaded is read into memory. Any reference to a target external module causes that module to be loaded and the references are updated to a relative address from the start base address of the application module.


With run-time dynamic loading: Some of the linking is postponed until actual reference during execution. Then the correct module is loaded and linked.

Report Error

View answer Workspace Report Error Discuss

0 2080
Q:

Swap two variables without using third variable.

Answer

#include<stdio.h>
int main(){
    int a=5,b=10;
    a=b+a;
    b=a-b;
    a=a-b;
    printf("a= %d  b=  %d",a,b);
}

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2079
Q:

The Ajanta Cave Paintings are a testimony to the golden age of ____ in India.

A) Buddhism B) Shaivism
C) Jainism D) Vaishnavism
 
Answer & Explanation Answer: A) Buddhism

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History

2 2079
Q:

Southerners who were for redemption wanted which of the following?

A) remove blacks from politics B) remove republicans from politics
C) hold political power D) All of the above
 
Answer & Explanation Answer: D) All of the above

Explanation:
Report Error

View Answer Report Error Discuss

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

0 2079
Q:

What happens to air when it is heated?

Answer

When heated any substance, the molecules move apart from each other. Alike in the air the molecules move apart from each other. We know that the warm air is lighter than the cool air. Since after heating air gets warmer, it floats up and the cool air comes down to occupy the warm air place.

Report Error

View answer Workspace Report Error Discuss

Subject: General Awareness Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Analyst , Bank Clerk , Bank PO

0 2079
Q:

In the following question, a sentence has been given in Active/Passive voice. Out of the four alternatives suggested, select the one 

Karnataka grows coffee

A) Coffee is being grown in Karnataka. B) Coffee grown in Karnataka.
C) Coffee is grown in Karnataka. D) Let the coffee be grown in Karnataka.
 
Answer & Explanation Answer: C) Coffee is grown in Karnataka.

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams

0 2079
Q:

The First battle of which war was the Battle of Alma?

A) Creek war B) Crimean war
C) Korean war D) Chinese war
 
Answer & Explanation Answer: B) Crimean war

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World History

2 2078