DS UNIT 01 CSM

DS UNIT 01 CSM

12th Grade

20 Qs

quiz-placeholder

Similar activities

Literasi Komputer SMPKVIP

Literasi Komputer SMPKVIP

KG - University

20 Qs

10D - Networks - Unit assessment

10D - Networks - Unit assessment

9th - 12th Grade

18 Qs

ASK TINGKATAN 1

ASK TINGKATAN 1

7th - 12th Grade

15 Qs

3.1 Areas of Computer Ethics Pt.1

3.1 Areas of Computer Ethics Pt.1

11th - 12th Grade

20 Qs

TMK - Cikgu Nor Asiah Mohd Noor

TMK - Cikgu Nor Asiah Mohd Noor

1st - 12th Grade

15 Qs

software

software

9th - 12th Grade

20 Qs

ASK TINGKATAN 2

ASK TINGKATAN 2

7th - 12th Grade

20 Qs

Sains Komputer Tingkatan 4 - 1.2.1 Menggunakan algoritma..

Sains Komputer Tingkatan 4 - 1.2.1 Menggunakan algoritma..

10th - 12th Grade

21 Qs

DS UNIT 01 CSM

DS UNIT 01 CSM

Assessment

Quiz

Computers

12th Grade

Hard

Created by

anusha ambeera

Used 1+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What will be the output of the following code?

struct node {

int data;

struct node *x;

struct node *y;

};

Implementation of DLL

Implementation of CLL

None

Implementation of SLL

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following code?

void function() {

if(head==NULL)

printf("\n List is Empty: ");

else {

    struct node *temp=head;

    head=head->next;

    free(temp) // temp->next=NULL;   }   }

DLL Delete At End

SLL Delete At End

SLL Insert At Beginning

SLL Delete At Beginning

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

.  Linked list and Array are considered as an example of ___________ type of memory allocation.


Static and Dynamic

Dynamic and Static

Heap and Dynamic

None

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following code?

void function()  {

 int value;

    struct node nn=(struct node)malloc(sizeof(struct node));

    nn->data=value;

    nn->next=NULL;

    if(head==NULL)

        head=nn;

    else  {

        nn->next=head;

        head=nn;      }  }

DLL Delete At End

SLL Delete At End

SLL Insert At Beginning

SLL Insert At End

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following code?

void function() {

 struct node *temp=head;

    while(temp!=NULL)  //while(temp)

    {

        printf("%d ",temp->data);

        temp=temp->next;   }  }

Displaying elements

Printing nodes

Traversal data

All

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

 Consider the following definition in c programming language.

struct node {

int data;

struct node *next;

} typedef struct node NODE;

NODE *nn;

Which of the following c code is used to create new node?

nn = (NODE*)malloc(sizeof(NODE));

nn = (NODE*)malloc(NODE);

nn = (NODE*)malloc(sizeof(NODE*));

nn = (NODE)malloc(sizeof(NODE));

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the value of the postfix expression 6 3 4 * + 2 - ?

-16

18

24

16

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?