Search Header Logo

Glitch Hunting Round-2

Authored by Smart venkey

Computers

University

Used 2+ times

Glitch Hunting Round-2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

what will be the output of the following pseudocode for p=3 and q=7

Integer function funn(Integer p, Integer q)

Integer r

set r=p

p=q

r=p

q=r

p=r

return p+q

End function funn ()

16

28

14

18

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the functionality of the following piece of code? Select the most appropriate

public void function(int data)

{

int flag = 0;

if( head != null)

{

Node temp = head.getNext();

while((temp != head) && (!(temp.getItem() == data)))

{

temp = temp.getNext();

flag = 1;

break;

}

}

if(flag)

System.out.println("success");

else

System.out.println("fail");

}

Print success if a particular element is not found

Print fail if a particular element is not found

Print success if a particular element is equal to 1

Print fail if the list is empty

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Given pointer to a node X in a singly linked list. Only one pointer is given, pointer to head node is not given, can we delete the node X from given linked list?

Possible if X is not last node

Possible if size of linked list is even

Possible if size of linked list is odd

Possible if X is not first node

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

------is a parameter passing method that waits

to evaluate the parameter value until it is used ?

pass by value

pass by name

pass by reference

pass by pointer

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The number of possible binary trees with 3 node is

12

13

5

9

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Find the answer for snipet code?

#include<stdio.h>

int main(){

int x=10;

if (x=1){

printf("Hello");

}

else{

printf("World");

}

Hello

World

HelloWorld

compilation error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

what is the output of the below

pseudocode?

set value=''*15;

print value

150

15

480

320

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?