Q1) Solve following: [2 marks each]
a) Write a difference between call by value and call by reference.
b) What is formal parameter? Give example.
c) What is dynamic memory allocation?
d) Which function is used to join two strings. Give Syntax.
e) Give difference between structure & union.
f) Explain malloc( ) and calloc( ) functions with example.
g)What is l-value and r-value?
h)What is an array slice? name any two languages supporting it.
i) What is the difference between compiler and preprocessor.
j) Define union and free union.
k) Explain two solutions to dangling pointers.
L) Define polymorphism with example
M) Give difference between Enum and Union.
N)What is deep and shallow binding.
0)What is lazy Evaluation.
q) Define the term “Constructor”
Q.2 a) Define the following terms (1 marks)
1) Precedence
2) Associativity
3) Orthogonality
4)String
5)Binding
Q.3 Solve following (Marks 5)
1) Explain different types of operators available in C.
2) Give Syntax and use of following functions:
i) getchar( )
ii) putchar( )
iii) puts( )
iv) printf( )
v) scanf( )
3) Briefly explain data encapsulation and data abstraction. With
example.
4) Find out the output of following code. Justify. [5 marks]
main( )
{ int a = 10, b = 20;
int c = 30;
printf (“%d %d %d”, a, b, c);
printf (“%d %d %d”, a, b, c);
5) What is enumeration type? Give design issues for enumeration type.
6) Briefly explain declarative paradigm and imperative paradigm. State
difference between both.
7) Explain implementation of Single Inheritance with suitable example.
8) What is descriptor? Draw descriptor for static length, limited dynamic
length strings.
9) What is Binding Time? Explain the different binding times at which
binding decisions can be made.
10) What is short-circuited evaluation. Explain working with an example.