VTU First Year Engineering (C Cycle) (Semester 1)
Programming in C and Data Structures
May 2016
Total marks: --
Total time: --
INSTRUCTIONS
(1) Assume appropriate data and state your reasons
(2) Marks are given to the right of every question
(3) Draw neat diagrams wherever necessary


1(a) What is psecudo-code? Compare it with an algorithm.
5 M
1(a) Find the Laplace transform of te3t sin 4t.
5 M
1(b) Convert the following into ' C ' expression ; \[i) x^{y}{^z}\ \ ii) e^{|\sqrt{x}|}\ \ iii) \dfrac{a\cdot b}{\sqrt{c}\cdot d}\ \ iv) \sqrt{s(s-a)(s-b)(s-c)}.\]
4 M
1(b) Find half-range cosine series for f(x)=ex,
0
5 M
1(c) Write a C program to find largest among three integers using ternary operators.
6 M
1(c) Is \( f(z)=\frac{z}{z} \)/ analytic?
5 M
1(d) Explain formatted input and output statement with examples.
5 M
1(d) Prove that \( \nabla x\left ( \bar{a}x \nabla \log r\right )=2\frac{(\bar{a}.\bar{r})\bar{r}}{r^4} \)/, where \bar{a} is a constant vector.
5 M

2(a) Write structure of C program. List primitive data types with size and range.
10 M
2(a) Find the Z- transform of \(\frac{1}{\left ( z-5 \right )^3} \)/ if |z|<5.
6 M
2(b) Define type casting. Explain with an example.
4 M
2(b) If V=3x2y+6xy-y3, show that V is harmonic & find the corresponding analytic function.
6 M
2(c) Evaluate following (where i = 2, j = 3, k = 4 and a = 5) :
i) a = i*( j/=k/i)
ii) a>>i%j
iii) * = a / i % i.
6 M
2(c) Obtain Fourier series for the function \( f(x)=\left\{\begin{matrix} 1+\frac{2x}{\pi }, -\pi\leq x\leq 0 & \\ \\ 1-\frac{2x}{\pi },0\leq x\leq \pi & \end{matrix}\right. \)/ hence deduce that \( \frac{\pi ^2}{8}=\frac{1}{1^2}+\frac{1}{3^2}+\frac{1}{5^2}+......... \)/
8 M

3(a) Write a C program to grade student result based on following conditions ;
i) Marks <35 grade "Fail"
ii) 35≥ Marks <60 grade "Second class"
iii)60≥ marks <70 grade "First class"
iv) 70≥ marks ≤ 100 grade "First class with distinction".
8 M
3(a) Find \( L^{-1}\left [ \frac{(s+2)^2}{(s^2+4s+8)^2} \right ] \)/ using convolution theorem.
6 M
3(b) Explain switch statement with an example.
7 M
3(b) Show that the set of functions \(1,\sin \left ( \frac{\pi x}{L} \right ),\cos\left ( \frac{\pi x}{L} \right ),\sin \left ( \frac{2\pi x}{L} \right ),\cos \left ( \frac{2\pi x}{L} \right ),.......... \)/ Form an orthogonal set in (-L,
L) and construct an orthonormal set.
6 M
3(c) Write a note on goto statement.
5 M
3(c) Verify Green's theorem for \( \int \left ( e^{2x}-xy^2 \right )dx+\left ( ye^x+y^2 \right )dy \)/ Where C is the closed curve bounded by y2=x&x2=y.
8 M

4((c) What is dangling else problem? Explain how to handle this in C programming.
4 M
4(a) Explain cascade if-else and nested if-else satements.
6 M
4(a) Find Laplace transform of \( f(t)=K\frac{t}{T}for 0/
6 M
4(b) Write a C program to implement simple calculator using operators +, - , * and /. Also handle divide by zero error. Use switch statement .
10 M
4(b) Show that the vector, \(\bar{F}=\left ( x^2-yz \right )i+\left ( y^2-zx \right )j+\left ( z^2-xy \right )k \)/ is irrotational and hence, find φ such that \bar{F}=∇φ
6 M
4(c) Find Found series for f(x) in (0,
2π), \(f(x)\left\{\begin{matrix} x,& 0\leq x\leq \pi \\ 2\pi -x, & \pi \leq x\leq 2\pi \end{matrix}\right. \)/ hence deduce that \( \frac{\pi ^4}{96}=\frac{1}{1^4}+\frac{1}{3^4}+\frac{1}{5^4}+.......... \)/
8 M

5(a) Define array? How two dimension arrays are declared and initialized ?
6 M
5(a) Use Gauss's Divergence theorem to evaluate \(\iint_{s}\bar{N}.\bar{F} ds \)/ where\[ \bar{F}=2xi+xyj+zk\] over the region bounded by the cylinder x2<\sup>+y2=4,
z=0,
z=6.
6 M
5(b) Write C program to genrate Fibonacci numbers using arrays.
6 M
5(b) Find inverse Z- transform of \( f(x)=\frac{z}{\left ( z-1 \right )\left ( z-2 \right )}, |z|>2 \)/
6 M
5(c) Explain following string function:
i) strlen
ii) strcpy
iii) strcmp
iv) strcat.
8 M
5(c) i) Find \(L^{-1}\left [ log\left ( \frac{s+1}{s-1} \right ) \right ] \)/
ii) \( L^{-1}\left [ \frac{s+2}{s^2-4s+13} \right ] \)/
8 M

6(a) Explain various ways of passing parameters to the functions.
6 M
6(a) Solve (D2+3D+2)y=2(t2+t+1) with y(0)=2 & y'(0)=0.
6 M
6(b) Write a C program to find factorial of an integer using recursive function.
8 M
6(b) Find the bilinear transformation which maps the points 0,
i,
-2i of z-plane onto the points -4i,
∞,
0 respectively of W-plane. Also obtain fixed points oft he transformation.
6 M
6(c) Write a C program to find length of string without using strlcn ( ) recursive function.
6 M
6(c) Find Fourier sine integral of \(\left\{\begin{matrix} x, &02 \end{matrix}\right. \)/
8 M

7(a) Compare arrays with structures.
6 M
7(b) Define structure. Explain it with an example.
5 M
7(c) Explain the following :
i) typedef to define structure
ii) Accessing structure members
iii) Initialization of structure.
9 M

8(a) Explain following file handling functions:
i) fopen ( )
ii) fclose ( )
iii) fscanf ( ) iv) fprinff ( )
v) fseek ( )
10 M
8(b) Write a C program to create a integer data file and then segregate odd and even integers into two different files.
10 M

9(a) What is pointer ? Explain with program.
6 M
9(b) Explain the following :
i) #define
ii) #include
iii) nesting of macro
iv) argumented macro.
10 M
9(c) Explain malloc and calloc functions.
4 M

10(a) What is sack? Explain Write its applications.
8 M
10(b) Explain queue and write its applications.
8 M
10(c) Write a note on trees.
4 M



More question papers from Programming in C and Data Structures
SPONSORED ADVERTISEMENTS