Search Header Logo

Quiz APr@5

Authored by Sreedhar Yellam

Computers

University

Used 2+ times

Quiz  APr@5
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the value of t if a = 56 , b = 876?

Function mul(a, b)

t = 0

while (b != 0)

t = t + a

b=b-1

End While

return t;

End Function

490563

49056

490561

None of the mentioned

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

How many times the following loop be executed?

{

ch = ‘b’;

while(ch >= ‘a’ && ch <= ‘z’)

ch++;

}

0

25

26

27

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following pseudo code?

Input m=9,n=6

m=m+1

n=n-1

m=m+n

if (m>n)

print m

else

print n

6

5

10

15

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of this C code?

#include <stdio.h>

void main()

{

double k = 0;

for (k = 0.0; k < 3.0; k++)

printf("Hello");

}

Run time error

Hello is printed thrice

Hello is printed twice

Hello is printed infinitely

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

int main()

{ int t=0;

for(;;)

{

if(t==10) break;

printf("%d ",++t);

}

return 0;

}

0 1 2 3 4 5 6 7 8 9 10

0 1 2 3 ... infinite times

1 2 3 4 5 6 7 8 9 10

1 2 3 4 5 6 7 8 9 1

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following pseudocode?

Integer p, q, r

set p=1, q=2, r=0

if (p < q )

p= p << 1

if ( p > q )

r= r << 1

end if

printf p + q + r

6

4

2

9

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following pseudocode?

Integer p, q, r

set p=1, q=1, r=1

if (0 | | 1 | | 1 )

p= p & 1

else

r = r & 1

end if

print p + q + r

18

-1

0

3

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?