Solapur University Question Paper
M.C.A. (Commerce – I) (Semester – I) Examination, 2014
C PROGRAMMING (New)
Day and Date : Tuesday, 6-5-2014 Max. Marks : 70
Time : 11.00 a.m. to 2.00 p.m.
Instructions : 1) All questions are compulsory.
2) Figures to the right indicate full marks.
1. Select the correct alternative. 10
1) What is lifetime of variable ?
a) Parts of the program where the variable is available
b) Length of time that the variable retains a particular value
c) Scope of the variable
d) None of these
2) What does “ch” in the following statement contain ?
Char ch = ‘A’;
a) A
b) ASCII code of A
c) Binary equivalent of ASCII code of A
d) Decimal equivalent of hexadecimal constant A
3) In which of the following situations pointers cannot be used ?
a) Manipulation of string
b) Dynamic memory allocations
c) Implementing stack
d) Addition of two memory allocation
4) The size of integer variable is
a) 1 byte b) 4 bytes c) 2 bytes d) 8 bytes
5) What is the size of char pointer ?
a) 1 byte b) 2 bytes or 4 bytes
c) 3 bytes d) always 4 bytes
Seat
No.
SLR-GL – 7 -2-
6) How will you declare the variable ptr as the pointer to array of 6 floats ?
a) float *ptr[6] b) float [6] *ptr
c) float (*ptr) [6] d) float (*ptr) (6)
7) Which of the following keyword is used to terminate a switch ?
a) Continue b) Break
c) Exit d) None of the above
8) The function used for reading formatted input data from a file is
a) getchar () b) fscanf ()
c) scanf () d) gets ()
9) The function strcat (s1, s2) in string .h
a) copies s1 to s2 b) copies s2 to s1
c) appends s1 to s2 d) appends s2 to end of s1
10) What is nested Structure ?
a) Union declared within a structure
b) Structure declared in another structure
c) Structure declared in union
d) Both a and b
2. Answer in 1-2 sentences. 10
i) Define Recursive function.
ii) What is an array ? Explain with example.
iii) Explain operators in C.
iv) Define void pointer.
v) Write a graphic program to display a circle with red color.
3. Attempt any four from following : 20
i) What is function ? Describe its parameter passing techniques with
example.
ii) Explain selection statements with example.
iii) Write a program for addition of two 3 X 3 matrix with explanation.
-3- SLR-GL – 7
iv) What is structure ? Explain with the example.
v) Explain dynamic memory allocation in C with suitable example.
vi) Write a program using pointers to swap two numbers.
4. Attempt any two from following : 20
i) Write a program to append contents of one file into another file.
ii) Define a structure Student with data members name, rollno, marks etc.
Write a C program to accept information of 10 students and display it.
iii) Define an array of 10 numbers and sort that array in ascending order.
5. Define structure employee with members empid, empname, salary etc. Write a
menu driven program to create an employee database using file and allow user
to perform following operations on database. 10
i) Add employee details.
ii) Delete employee details.
iii) Search employee details.
iv) Display employee details.
_______________
M.C.A. (Commerce – I) (Semester – I) Examination, 2014
C PROGRAMMING (New)
Day and Date : Tuesday, 6-5-2014 Max. Marks : 70
Time : 11.00 a.m. to 2.00 p.m.
Instructions : 1) All questions are compulsory.
2) Figures to the right indicate full marks.
1. Select the correct alternative. 10
1) What is lifetime of variable ?
a) Parts of the program where the variable is available
b) Length of time that the variable retains a particular value
c) Scope of the variable
d) None of these
2) What does “ch” in the following statement contain ?
Char ch = ‘A’;
a) A
b) ASCII code of A
c) Binary equivalent of ASCII code of A
d) Decimal equivalent of hexadecimal constant A
3) In which of the following situations pointers cannot be used ?
a) Manipulation of string
b) Dynamic memory allocations
c) Implementing stack
d) Addition of two memory allocation
4) The size of integer variable is
a) 1 byte b) 4 bytes c) 2 bytes d) 8 bytes
5) What is the size of char pointer ?
a) 1 byte b) 2 bytes or 4 bytes
c) 3 bytes d) always 4 bytes
Seat
No.
SLR-GL – 7 -2-
6) How will you declare the variable ptr as the pointer to array of 6 floats ?
a) float *ptr[6] b) float [6] *ptr
c) float (*ptr) [6] d) float (*ptr) (6)
7) Which of the following keyword is used to terminate a switch ?
a) Continue b) Break
c) Exit d) None of the above
8) The function used for reading formatted input data from a file is
a) getchar () b) fscanf ()
c) scanf () d) gets ()
9) The function strcat (s1, s2) in string .h
a) copies s1 to s2 b) copies s2 to s1
c) appends s1 to s2 d) appends s2 to end of s1
10) What is nested Structure ?
a) Union declared within a structure
b) Structure declared in another structure
c) Structure declared in union
d) Both a and b
2. Answer in 1-2 sentences. 10
i) Define Recursive function.
ii) What is an array ? Explain with example.
iii) Explain operators in C.
iv) Define void pointer.
v) Write a graphic program to display a circle with red color.
3. Attempt any four from following : 20
i) What is function ? Describe its parameter passing techniques with
example.
ii) Explain selection statements with example.
iii) Write a program for addition of two 3 X 3 matrix with explanation.
-3- SLR-GL – 7
iv) What is structure ? Explain with the example.
v) Explain dynamic memory allocation in C with suitable example.
vi) Write a program using pointers to swap two numbers.
4. Attempt any two from following : 20
i) Write a program to append contents of one file into another file.
ii) Define a structure Student with data members name, rollno, marks etc.
Write a C program to accept information of 10 students and display it.
iii) Define an array of 10 numbers and sort that array in ascending order.
5. Define structure employee with members empid, empname, salary etc. Write a
menu driven program to create an employee database using file and allow user
to perform following operations on database. 10
i) Add employee details.
ii) Delete employee details.
iii) Search employee details.
iv) Display employee details.
_______________
0 comments:
Pen down your valuable important comments below