Professional Documents
Culture Documents
Ay20 21 - R18e1 Sem 1 - Mid 2 - Ece PDS 30072021
Ay20 21 - R18e1 Sem 1 - Mid 2 - Ece PDS 30072021
Ay20 21 - R18e1 Sem 1 - Mid 2 - Ece PDS 30072021
4X10 Marks= 40
The Question Paper Consists of 8 questions. Answer any 4 questions
Each Question Carries 10 Marks and may have ‘A’, ‘B’ as two sub-questions
Note (if any): Usage of any data/ Scientific calculator/code book may be permitted/not
permitted.
***
1 A. What are the operators that I have used in the given code & explain the purpose of them.
What would be the output ?? Give an explanation for it . (4M )
#include<stdio.h>
main( )
{
char *name = “RGUKT” , *place = “RKVALLEY”;
printf( “ %s %c” , &*&*name , *place );
B. Define Dynamic Memory Allocation . what is the purpose of it & explain the methods
used for dynamic allocation? .
i. void pointer ii . wild pointer iii. Double pointer iv . Dangling pointer v . Null
pointer
3. 3 6 9
A
7 5 8
2 1 0
II. Assume the name given for above table is A, What would be the result of expression
(*(A + 2) + 1 ) 1M
III. Interpret the expression *(*A + 1)+2 in step-by-step manner & find the equivalent
subscript expression for it. 2M
B . Explain the difference in between Call by value & Call by Reference with an example
?Why should we have to choose call by reference over call by value. 5M
5. Define Stack & Linked List .Write a program to perform insertion & deletion of a node to
and from the single Linked List.
6. A . List out three differences in between Structure & Union with an example . 6M
B . Explain strcpy( ) with an example .What would be the output for the following code. If
used union instead of structure data type, what would be the changes that take place ?
4M
#include<stdio.h>
#include<string.h>
struct student
{
char name[20];
}std;
7. Write a program to define a structure for a book that has members- author, name, type,
publisher.
a. Display the details of a book i.e., author, name, type, publisher
b. Write a function to display the count of books belong to a particular type
c. Write a function to search the book through the author or book name or publisher.
B. What you have learnt through the course Programming in C & Data Structure. Explain
in brief about the purpose of each Unit.