What will be the output of the following code?
struct node {
int data;
struct node *x;
struct node *y;
};
DS UNIT 01 CSM
Quiz
•
Computers
•
12th Grade
•
Hard
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
16 questions
Mikrodenetleyici ve Robotik Soruları
Quiz
•
10th Grade - University
20 questions
ASAS SAINS KOMPUTER T3
Quiz
•
10th - 12th Grade
22 questions
ASK Tingkatan 2 -(3.2 Struktur Kod Arahan - Ralat)
Quiz
•
1st - 12th Grade
16 questions
T4 1.7 PEMBANGUNAN APLIKASI
Quiz
•
10th - 12th Grade
16 questions
Introduction to DBMS
Quiz
•
11th - 12th Grade
20 questions
Computer Maintenance
Quiz
•
1st Grade - Professio...
25 questions
Drone Teknologi
Quiz
•
11th - 12th Grade
15 questions
Kuis Kelas Maya
Quiz
•
12th Grade - University
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
17 questions
Parts of Speech
Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression
Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing
Quiz
•
9th - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University