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:

NMCG means

A) National Mission for Clean Ganga B) National Money Collection Group
C) National Mutual funds for College Gang D) None of the above
 
Answer & Explanation Answer: A) National Mission for Clean Ganga

Explanation:

NMCG means National Mission for Clean Ganga.

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

What's the maximum hard drive size for FAT16-based Windows system?

Answer

Maximum hard drive size for FAT16-based windows system is 2GB.

Report Error

View answer Workspace Report Error Discuss

Subject: Hardware

0 2071
Q:

Most catches in test cricket by wicket keeper?

A) MV. Boucher B) M.S Dhoni
C) Gilchrist D) IA. Healy
 
Answer & Explanation Answer: A) MV. Boucher

Explanation:
Report Error

View Answer Report Error Discuss

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

4 2070
Q:

The book 'Sudhir Sukta' was written by

A) Vishnu Wagh B) Nazir Ahmad Wani
C) Andrea Levy D) Tian Er
 
Answer & Explanation Answer: A) Vishnu Wagh

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

4 2070