
Unit 1 - DSA - AI A
Authored by Reshmy Krishnan
Computers
University
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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;
Access all questions and much more by creating a free account
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
Already have an account?
Similar Resources on Wayground
10 questions
python test 1_23_24
Quiz
•
University
15 questions
LINUX OPERATING SYSTEM
Quiz
•
University
10 questions
ARRAYS 1
Quiz
•
University
15 questions
INFORMATIKA X-5
Quiz
•
10th Grade - University
15 questions
Coding club Summit Online Quiz
Quiz
•
University
10 questions
Quis CSS W3Schools
Quiz
•
University
10 questions
TEKNIK LAYANAN JARINGAN
Quiz
•
University
13 questions
مراجعة للتطبيق الثاني تقن105
Quiz
•
University
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
5 questions
What is Presidents' Day?
Interactive video
•
10th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
20 questions
Mardi Gras History
Quiz
•
6th Grade - University
10 questions
The Roaring 20's Crash Course US History
Interactive video
•
11th Grade - University
17 questions
Review9_TEACHER
Quiz
•
University