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

What would be the output of the following program?

main()

{

    int i = -3, j =2, k =0, m ;

    m = ++j && ++i || ++k ;

    Printf ( "\n%d%d%d%d", i , j , k , m );

}

Answer

-2  3  0  1

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

1 2072
Q:

What would be the output of the following program?

main()

{

    printf (" %d%d%d ", sizeof (3.14f), sizeof (3.14), sizeof (3. 141);

}

Answer

4  8  10

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2072
Q:

What would be the output of the following program?

main()

{

    float a = 0.7;

    if ( a < 0.7f )

          printf ( " C ");

    else 

          Printf ( " C++ ");

}

Answer

C++

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2072
Q:

What is the theme of the "Asia LPG 2019 Summit"?

A) LPG – Energy for Life B) LPG – Petroleum for Life
C) LPG for Life D) None of the above
 
Answer & Explanation Answer: A) LPG – Energy for Life

Explanation:
Report Error

View Answer Report Error Discuss

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

1 2072
Q:

By definition a clade is

A) monophyletic B) polyphyletic
C) parsimonious D) paraphyletic
 
Answer & Explanation Answer: A) monophyletic

Explanation:

A clade is a group of ancestral species and all its descendants. Hence it is a branch of one same species and so monophyletic.

Report Error

View Answer Report Error Discuss

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

1 2072
Q:

Laterite soils contain high amounts of

A) Calcium carbonate B) Silicates
C) Calcites D) Iron oxide
 
Answer & Explanation Answer: D) Iron oxide

Explanation:

Laterite soils are a tropical soil and possess a great amount of iron and aluminum. Due to its high iron oxide content they look like rusty-red coloration.

Report Error

View Answer Report Error Discuss

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

5 2071
Q:

In 2015, a special semi-luxury train covering Jaisalmer, Jodhpur & Jaipur was launched by the IRCTC. What is the name of the train?

A) Rajasthan Darshan B) Rajasthan Queen
C) Desert Circuit D) Desert Queen
 
Answer & Explanation Answer: C) Desert Circuit

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: Bank Exams

0 2071