Rapid Round 1

Rapid Round 1

University

10 Qs

quiz-placeholder

Similar activities

SLG IPC Week 7

SLG IPC Week 7

University

13 Qs

Operators in C

Operators in C

University

12 Qs

C programming

C programming

University

15 Qs

BASIC C PROGRAMMING QUIZ

BASIC C PROGRAMMING QUIZ

University

15 Qs

Expression in C Programming

Expression in C Programming

University

10 Qs

Unit-2 Test-2

Unit-2 Test-2

University

15 Qs

Recursion

Recursion

University

8 Qs

c-languiz

c-languiz

University

10 Qs

Rapid Round 1

Rapid Round 1

Assessment

Quiz

Computers

University

Hard

Created by

VIKASH AGS22ABCA169

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

The height of a binary tree is the maximum number of edges in any root to leaf path. The maximum number of nodes in a binary tree of height h is:

2^h−1

2^h−1−1

2^h+1−1

2^h+1

2.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Consider a binary min-heap containing 105 distinct elements. Let k be the index (in the underlying array) of the maximum element stored in the heap. The number of possible values of k is

53

52

27

1

3.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Consider a hash table with 100 slots. Collisions are resolved using chaining. Assuming simple uniform hashing, what is the probability that the first 3 slots are unfilled after the first 3 insertions?

(97×97×97)/100^3

(99×98×97)/100^3

(97×96×95)/100^3

(97×96×95/(3!×100^3)

4.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What will be output of this code? #include int main(){ int i = -3; unsigned short u; u = i; printf("%u", u); printf("%d", u); return 0; }

65533 -3

65533 65533

-3 -3

65533 3

5.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

#include struct Ournode{ char x, y, z; }; int main() { struct Ournode p={'1', '0', 'a'+2}; struct Ournode *q=&p; printf("%c, %c", *((char*)q+1), *((char*)q+2)); return 0; } The output of this program is:

0, c

0, a+2

'0', 'a+2'

'0', 'c'

6.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

#include int main() { int i= 255; short int *s= (short int *)&i; printf("%d\n", *s); }

255,0

65280,0

0,0

0,65280

7.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

In which of the following cases is it possible to obtain different results for call-by-reference and call-by-name parameter passing methods?

Passing a constant value as a parameter

Passing the address of an array as a parameter

Passing an array element as a parameter

Passing an array

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?