Search Header Logo

Find the Output- Conditional statements and Loop Structure

Authored by Aakanksha Chopra

Computers

University

Used 6+ times

Find the Output- Conditional statements and Loop Structure
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

40 questions

Show all answers

1.

FILL IN THE BLANK QUESTION

5 mins • 1 pt

Q1. What would be the output of the following program:

void main()

{

int a= 300, b, c;

if(a>=400)

b=300;

c=200;

printf(“ \n %d %d ” , b ,c);

}

2.

FILL IN THE BLANK QUESTION

5 mins • 1 pt

What would be the output of the following programs-

void main()

{

int a= 500, b, c;

if(a>=400)

b= 300;

c=200;

printf(“ \n %d %d ” ,b ,c);

}

3.

FILL IN THE BLANK QUESTION

5 mins • 1 pt

void main()

{

int x=10, y=20;

if(x==y);

printf(“ \n %d %d” ,x ,y);

}

4.

FILL IN THE BLANK QUESTION

5 mins • 1 pt

void main()

{

int x=3, y=5;

if(x==3)

printf(“ \n %d” ,x);

else

printf(“ \n %d” ,y);

}

5.

FILL IN THE BLANK QUESTION

5 mins • 1 pt

void main()

{

int x=3;

float y=3.0;

if(x==y)

printf(“ \n x and y are equal”);

else

printf(“ \n x and y are not equal”);

}

6.

FILL IN THE BLANK QUESTION

5 mins • 1 pt

void main()

{

int x=3, y, z;

y=x=10;

z=x<10;

printf(“ \n x = %d y = %d z = %d” ,x ,y, z); }

7.

FILL IN THE BLANK QUESTION

5 mins • 1 pt

void main()

{

int k=35;

printf(“ \n %d %d %d”, k = =35, k= 50, k>40);

}

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?