Data Structure

Data Structure

4th Grade

10 Qs

quiz-placeholder

Similar activities

Warzywa 2

Warzywa 2

1st - 6th Grade

10 Qs

LA EVALUACIÓN HECHA PRÁCTICA

LA EVALUACIÓN HECHA PRÁCTICA

1st Grade - University

12 Qs

portfolio assessment

portfolio assessment

1st - 5th Grade

10 Qs

Vérifs + Thèmes Permis C

Vérifs + Thèmes Permis C

1st - 5th Grade

9 Qs

Факт чи судження?

Факт чи судження?

1st - 12th Grade

15 Qs

Wyroby żelowe - kartkówka

Wyroby żelowe - kartkówka

1st - 5th Grade

10 Qs

United Way Kickoff 2021

United Way Kickoff 2021

1st Grade - Professional Development

12 Qs

Python Marathon (Easy Round)

Python Marathon (Easy Round)

1st - 6th Grade

10 Qs

Data Structure

Data Structure

Assessment

Quiz

Professional Development

4th Grade

Hard

Created by

K Indira

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Choose the Application

Stack

Queue

List ADT

List

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include <stdio.h>

int main()

{

int arr[] = {1,2,3,4,5};

printf("arr [0] is %d", arr[0]);

// arr[10] is out of bound

printf("arr[10] is %d", arr[10]);

return 0;

}

Error

arr [0] is 1

arr[10] is -1786647872

arr [0] is 1

arr[10] is -1786647872

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include <stdio.h>

int main()

{

int arr[] = {1,2,3,4,5};

printf("arr [0] is %d",arr[0]);

printf("arr[10] is %d",arr[10]);

// allocation memory to out of bound

// element

arr[10] = 11;

printf("arr[10] is %d",arr[10]);

return 0;

}

Segmentation Fault (SIGSEGV)

Output will be displayed

Compiler Error

None of the above

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Predict the ourput:

printf("Enter the value to insert\n");

scanf("%d", &value);

for (c = n - 1; c >= position - 1; c--)

array[c+1] = array[c];//Moving to Next Position

array[position-1] = value;//Array Index

printf("Resultant array is\n");

for (c = 0; c <= n; c++)

printf("%d\n", array[c]);

return 0;

insert an element in an Array

delete an element in an Array

insert an element in the middle

delete an element in the middle

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

scanf("%d", &position);

if(position >= n+1)

printf("\n\nDeletion not possible\n\n");

else

// updating the locations with next elements

for(c = position-1; c < n-1; c++)

array[c] = array[c+1];

printf("\n\nResultant array is: ");

/*

the array size gets reduced by 1

after deletion of the element

*/

for(c = 0; c < n-1; c++)

printf("%d ", array[c]);

printf("\n\n\t\t\tCoding is Fun !\n\n\n");

Delete an Element from Array

Insert an Element from Array

Insert an Element from Array in the middle

Delete an Element from Array in the middle

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

{

if(p!=0)

{

int elt,flag=0;

printf("Enter the element to search in the List");

scanf("%d",&elt);

for(int i=0;i<p;i++)

{

if(L[i]==elt)

{

printf("The %d is available at %d ", elt, i);

flag=1;

}

}

if(flag==0)

{

printf("Element not found in the list");

}

}

else

{

printf("The List is empty");

}

}

Insert the Element

Delete the Element

Find the Element

Insert the Element at Last

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

if(isStackFull())

printf("Unable to %d as the Stack Is Full\n",val);

else

{

//increment top by 1

++top;

arr[top]=val;

}

PUSH

POP

Middle element

none of the these

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?