
Unit 1 - DSA - AI A
Quiz
•
Computers
•
University
•
Hard
Reshmy Krishnan
Used 3+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What are the disadvantages of arrays?
Index value of an array can be negative
Elements are sequentially accessed
Data structure like queue or stack cannot be implemented
There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated size
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the size of the following structure?
#include <stdio.h>
struct temp {
int a[5];
char p;
};
6
10
20
24
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the time complexity to insert a single element in the array?
O(1)
O(n)
O(log n)
O(n log n)
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following program?
#include <stdio.h>
int main()
{
int arr[5] = { 2, 6, 8, 13, 19 };
// Modifing the data
for (int i = 0; i < 5; i += 2)
arr[i]++;
for (int i = 0; i < 5; i++)
printf("\t %d", arr[i]);
return 0;
}
2, 6, 8, 13, 19
3, 6, 9, 13, 20
3, 7, 9, 14, 20
2, 6, 8, 14, 20
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following program?
int main()
{
int arr[ ] = { 1, 2, 3, 4, 5 };
for (int i = 0; i < 5; i++)
printf("\t %d", *(arr + i) );
return 0;
}
1, 3, 5, 7, 9
1200, 1201, 1202, 1203, 1204
1 2 3 4 5
2, 4, 6, 8, 10
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Comment on the following pointer declaration:
int *ptr, p;
ptr is a pointer to integer, p is not.
ptr and p, both are pointers to integer.
ptr is pointer to integer, p may or may not be.
ptr and p both are not pointers to integer.
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is an incorrect syntax for pointer to structure?
struct temp{
int b;
}*my_struct;
*my_struct.b = 10;
(*my_struct).b = 10;
my_struct->b = 10;
Both my_struct.b = 10; and (my_struct).b = 10;
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple

Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
10 questions
C++ Fundamentals
Quiz
•
University
10 questions
DS Quiz-1
Quiz
•
KG - University
10 questions
C quiz
Quiz
•
University
15 questions
C++ Quiz-1
Quiz
•
University
15 questions
Coding and Debugging
Quiz
•
University
10 questions
Seminar1_EDA25
Quiz
•
University
13 questions
DS UNIT-2 TEST-2
Quiz
•
University
8 questions
Sistemas Operativos - Capítulo 5 - Memória e Ponteiros
Quiz
•
University
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
Discover more resources for Computers
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms
Quiz
•
11th Grade - University
38 questions
Unit 6 Key Terms
Quiz
•
11th Grade - University
20 questions
La Hora
Quiz
•
9th Grade - University
7 questions
Cell Transport
Interactive video
•
11th Grade - University
7 questions
What Is Narrative Writing?
Interactive video
•
4th Grade - University