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:

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

A solution developer needs to configure the HTTP listener of an Integration Server on a Linux Server.

Which operating system privileges does the developer need to modify Integration node
properties and properties of integration node resources?

A) root user B) mqm
C) mqbrks D) mqm and mqbrks
 
Answer & Explanation Answer: A) root user

Explanation:
Report Error

View Answer Report Error Discuss

14 2071
Q:

Which molecule is nonpolar and has a symmetrical shape?

A) NH3 B) HCl
C) H2O D) CH4
 
Answer & Explanation Answer: D) CH4

Explanation:

Among the given options, CH4 is a non polar molecule with symmetrical tetrahedral shape.

Report Error

View Answer Report Error Discuss

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

1 2070
Q:

India's only Naval Aviation Museum is located in which state?

A) Kerala B) Goa
C) Tamil Nadu D) Karnataka
 
Answer & Explanation Answer: B) Goa

Explanation:
Report Error

View Answer Report Error Discuss

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

5 2069