0% found this document useful (0 votes)
26 views

DSC-3 2932811101 Fundamental of Computer Programming

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

DSC-3 2932811101 Fundamental of Computer Programming

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

[This question paper contains 4 printed pages.

]
Your Roll No....

Sr. No. of Question Paper : 8638 G

Unique Paper Code 2932811101

Name of the Paper : Fundamental of Computer


Programming
Name of the Course : B. Tech. (CSE / ECE / EE)
Semester

Duration:3 Hours Maximum Marks: 90

Instructions for Candidates


1. Write your RollNo. on the top immediately on receipt
of this question paper.
2. Attempt five questions in all, including question no. I
which is commpulsory
3. Non -programmable scientific calculator is allowed.
4. All questions carry equal marks.

1. (a) Explain the basic structure ofaC program with an


example.
(b)Show step by step evaluation of
at = b*=c-=5 where a=5, b=7 and c=10
(c)Differentiate between formal arguments and actual
arguments of a function.

P.T.0.
8638
(d) What isthe difference between exit-controlled and
entry conttolled loops?
) l e nccd t0 MCreaNC he STZe of an alread..
allocated artay dynamically, How will ue.
avvomphsh this task? Give an example.
) lN dtlerences betwecn arrays and structures.
(3x6=18)
a) What do you understand by preprocessor directive?
Eplain #define and # include preprocessor
directives through a programming example.
(b) Explain basic data types available in C? Write a
C program to compute their size. (9x2=18)
(a) Write a C program to find the second largest
element in an array.
(b) What do you understand by recursion in C? What
value does the call num(5) return, where num is
defined as follows:
int num(int n){

if (n == 0)

return 1;

retun 2 num (n - 1);

(9x2=18)
8638 3

4. (a) Explain the differences between user


defined and
library functions. Write a Cprogram that contains
a user defined function to
calculate the area of a
circle of a given radius r. This function must use
a library function to calculate the square of radius
r.

(b) Give the output of following code snippet:

#include stdio.h

void main()

int *ptri

int age= 20;

ptr &age;

print f ("%d %d %d %d %d %d", age,


ptr, &age, &ptr, *ptr, * (&ptr) ) ;

(9x2=18)

5
(a) Implement a C program to open a pre-existing file
and add information at the end of file. Display the
contents of the file before and after appending
the information to the file.
P.T.0.
8638 4

(b) Write a program in Cto concatenate two strings


without using strcat(...) function. (9x2=18)

6. (a) Differentiate between structure and union. Create


a structure for bank application that has the
following fields: account number, account holder's
name, account holder's Age, type of account
(saving or recurrent), balance and amount (to
deposit or withdraw).

(b) Write a menu driven program using switch case


statements that allows the user to select functions
to input_data(), display_data(), deposit(),
withdraw() and check balance() for the structure
made in 6(a) for 10 bank customers. (9x2=18)

(400)

You might also like