
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
12 questions
Semana 3
Quiz
•
University
10 questions
Python-Quiz-Basic-Datatypes
Quiz
•
12th Grade - Professi...
11 questions
Latex
Quiz
•
University
10 questions
Quiz 3
Quiz
•
University
10 questions
Quiz 1
Quiz
•
University
12 questions
Java quiz-2024-Sec-B
Quiz
•
University
10 questions
CSS-каскад стиль
Quiz
•
University
15 questions
Quizizz Sakti
Quiz
•
University
Popular Resources on Wayground
8 questions
Spartan Way - Classroom Responsible
Quiz
•
9th - 12th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
14 questions
Boundaries & Healthy Relationships
Lesson
•
6th - 8th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
3 questions
Integrity and Your Health
Lesson
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
9 questions
FOREST Perception
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
Discover more resources for Computers
20 questions
Disney Trivia
Quiz
•
University
7 questions
Fragments, Run-ons, and Complete Sentences
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
10 questions
DNA Structure and Replication: Crash Course Biology
Interactive video
•
11th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
20 questions
Implicit vs. Explicit
Quiz
•
6th Grade - University
14 questions
Ch.3_TEACHER-led
Quiz
•
University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University