Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

data structures

Rating
-
Sold
-
Pages
7
Grade
A
Uploaded on
18-10-2023
Written in
2022/2023

Exam of 7 pages for the course internal tests at internal tests (data structures)

Institution
Course

Content preview

Department of Computer Science and Engineering

INTERNAL TEST - I
Semester: III Session: July – Dec 2021
Course Name: Data Structure using C Course Code: 18CSI301
Date: 24-09-2021 Max Marks: 100
Time: 9:30 PM – 12:30 PM Duration: 3 Hours


Note:
i. All questions are compulsory.
ii. All questions carry 10 marks.
iii. Missing data can be assumed suitably.


Bloo
Q Mar CO’
Questions m’s
# ks s
Level
1. i Identify the statement having the disadvantage of arrays? 1 CO1 L2
a. It can be used to store multiple values of similar type.
b. There are chances of wastage of memory space if elements
inserted in an array are lesser than the allocated size.
c. In an array, accessing an element is very easy by using the index
number.
d. It allows us to store known number of elements in it.
ii Point out the correct way to initialize an array in C? 1 CO1 L2
a. int arr[3] = (1,2,3);
b. int arr(3) = {1,2,3};
c. int arr[3] = {1,2,3};
d. int arr(3) = (1,2,3);
iii Use the following C code to obtain the output? 1 CO1 L3




Page 1 of 7

, Department of Computer Science and Engineering




a.10
b. Compile time error
c. Segmentation fault/runtime crash since pointer to local variable is
returned
d. Undefined behavior
iv Identify the correct comment on the following pointer declaration? 1 CO1 L2

int *ptr, p;

a) ptr is a pointer to integer, p is not
b) ptr and p, both are pointers to integer
c) ptr is a pointer to integer, p may or may not be
d) ptr and p both are not pointers to integer
v Which of the following header files must necessarily be included to use 1 CO1 L1
dynamic memory allocation functions?
a) stdlib.h
b) stdio.h
c) memory.h
d) dos.h
vi Consider the following user defined data type and tell the maximum size 1 CO2 L2
occupied by the data?

Union Data
{
int i;



Page 2 of 7

Written for

Course

Document information

Uploaded on
October 18, 2023
Number of pages
7
Written in
2022/2023
Type
Exam (elaborations)
Contains
Only questions

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
antonitotheophor

Get to know the seller

Seller avatar
antonitotheophor Harvard University
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
2 year
Number of followers
0
Documents
193
Last sold
-
testbnks

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions