Data Structure

Data Structure

4th Grade

10 Qs

quiz-placeholder

Similar activities

Urządzenia chłodnicze

Urządzenia chłodnicze

1st - 6th Grade

15 Qs

Scientific Python

Scientific Python

KG - Professional Development

10 Qs

Mixtures and solutions

Mixtures and solutions

4th Grade

15 Qs

Acing the Interview

Acing the Interview

KG - Professional Development

10 Qs

Blended Learning Models

Blended Learning Models

KG - University

11 Qs

KCw and Life - Quiz 3

KCw and Life - Quiz 3

1st - 5th Grade

10 Qs

jQuery podstawy

jQuery podstawy

1st - 5th Grade

11 Qs

Art Exploration Quiz

Art Exploration Quiz

4th Grade - University

15 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
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?