Search Header Logo

BA340 Lec4

Authored by Oyungerel Delger

Computers

3rd Grade

Used 2+ times

BA340 Lec4
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

int x=0;

switch(x) {

case 1: printf( "One" );

case 0: printf( "Zero" );

case 2: printf( "Hello World" );

} //Юу хэвлэх вэ?

Zero

One

Hello World

ZeroHello World

2.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

#include <stdio.h>

void main()

    int a=10;

    switch(a){

        case 5+5:

            printf("Hello\n");

        default:

            printf("OK\n");

    }

}

Hello

OK

Hello

OK

Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

#include <stdio.h>

void main(){ 

    int a=2;

    switch(a){

        printf("Message\n");

        default:

            printf("Default\n");

        case 2: printf("Case-2\n");

        case 3: printf("Case-3\n");}

    printf("Exit from switch\n");}

Case-2

Message

Message

Case-2

Case-2

Case-3

Exit from switch

4.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

int a=5, b=9, c=1;

if(a<b && b>c);

printf("Hi");

else printf("Hello");

Hi

Hello

Hi

Hello

Код алдаатай тул үр дүн гарахгүй

5.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

int a=51, b=9;

if(a<b || b>2)

printf("Hi");

else printf("Hello");

Hi

Hello

Hi

Hello

Алдаатай тул ажиллахгүй

6.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

int a=1,b=2,c=3,d=4;

int x=a;

if(a>b)

if(b<c) x=b;

else x=c;

printf("%d",x);

1

2

3

алдаатай тул ажиллахгүй

7.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

int a=1;b=2;c=3;d=4;

int x=a;

if(a>b)

if(b<c) x=b;

else x=c;

printf("%d",x);

Алдаатай мөрийг олох.

1

2

4

6

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

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?