# WeCP Pseudo Code Quiz 1

Question 1 Time: 00:00:00
#include<stdio.h>

int main()

{

int n=24;

int out=1;

while(n>=3)

{

n=n/2;

out=out*(n/2);

}

printf("%d",1+out);

} 1

1

-1

-1

zero

zero

Error

Error

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 2 Time: 00:00:00
Integer a,b,c

if(a>b or a>c)

Print a

if(a+b>c and b<c)

Print c

When all both if conditions will become true? a=3 b=4 c=5

a=3 b=4 c=5

a=5 b=4 c=3

a=5 b=4 c=3

a=5 b=3 c=6

a=5 b=3 c=6

None of the above

None of the above

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 3 Time: 00:00:00
Integer a,b,c,d,i

Set a=38,b=0,c=5,d=0,i=1

while(a>c)

b=(c+d)*2

d=r<<i

while(b<30)

print d

d+=6

b+=d

end while

c+=10

end while 10 16

10 16

2 10

2 10

16 10

16 10

None of the above

None of the above

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 4 Time: 00:00:00
Integer a,b,c,d,i

Set a=24,b=0,c=16,d=2,i=1

while(a>c)

d=c>>i

a+=d

while((b-3)<25)

print d

b+=8

d=d+1

end while

c+=20

end while 2 4 6 8

2 4 6 8

8 9 10 11

8 9 10 11

2 2 2 2

2 2 2 2

8 8 8 8

8 8 8 8

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 5 Time: 00:00:00
Integer solve(int x,int y)

if(x>y or x-2>y-5)

Return x+y-2

End if

Return y

End solve()

Print solve(1,0) 1

1

2

2

zero

zero

-1

-1

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 6 Time: 00:00:00
Integer man

Set man=1

Interegr arr={0,1,0,2}

arr=a+a

arr=a+a

arr=a

man=a

if(man>0)

man-=1

Else

man+=1

End if

Print man 1

1

2

2

3

3

4

4

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 7 Time: 00:00:00
Integer a,b,c

Set a=3,b=4,c=5

b=a&c

if(a or b or c)

c=20

End if

if(a&b or b^c or c^a)

a=a+2

End if

Print -1*c+(a+b) -14

-14

14

14

7

7

19

19

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 8 Time: 00:00:00
Integer p,q

Set p=3,q=3

p=q

if(p^p)

p=1

Else

q=2

End if

Print p*q 8

8

7

7

6

6

5

5

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 9 Time: 00:00:00
Integer p,q

Set p=-1,q=1

if(p+q)

p=23

Else

q=-23

End if

Print p*q 529

529

46

46

-23

-23

23

23

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 10 Time: 00:00:00
Integer a,b,c,j

Set a=12,b=14

c=a+b

b=c mod a

a+=b

b=a+c

For (each j from 3 to 4)

b=b-j

End for

Print b 22

22

33

33

44

44

55

55

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

["0","40","60","80","100"]
["Need more practice!","Keep trying!","Not bad!","Good work!","Perfect!"] Personalized Analytics only Availble for Logged in users

Analytics below shows your performance in various Mocks on PrepInsta

Your average Analytics for this Quiz

Rank

-

Percentile

0%

Completed

0/0

Accuracy

0%