University Of Pune Question Paper
P. G. D. B. M. (Semester - IV) Examination - 2010
(C) ‘C’ PROGRAMMING
(SPECIALIZATION - II)
(New 2008 Pattern)
Time : 3 Hours] [Max. Marks : 70
Instructions :
(1) Question No. 1 is compulsory.
(2) Solve any five out of the remaining questions.
Q.1) (A) Trace output and justify answer : [12]
(a) #include <stdio.h>
main( )
{
int i, n; n = 0;
for (i = 0; i < = 10; i++, printf(“%d”, i))
n++;
printf(“%d”, n);
}
(b) #include <stdio.h>
main( )
{
int k, no = 0:
k = (no < 5 ? (no < = 10 ? 100 : 200) : 500);
printf(“%d”, k);
}
(c) #include <stdio.h>
main( )
{
int i = 6720, j = 4;
while ((i % j) == 0) {
i = i/j;
j = j + 1;
}
printf(“%d”, j);
}
(B) Explain the following : (Any Two) [08]
(a) Storage Classes
(b) Dynamic Memory Allocation
(c) Arrays in C
Q.2) Write a program to print the following pattern : [10]
A BCDE
A BCD
A BC
A B
A
Q.3) Accept 10 numbers in a integer array and sort array in the descending
order. [10]
Q.4) Write user defined function to find length of the given string. [10]
Q.5) Write a recursive function to calculate x raise to y (xy
). [10]
Q.6) Write a program to generate score card of cricket match which will
accept name of player, number of balls played, number of runs scored,
wickets taken. (Use structure) [10]
Q.7) Write a program to accept file names through command line argument
and copy contents of file 1 to file 2 skipping all the vowels from
file 1. [10]
P. G. D. B. M. (Semester - IV) Examination - 2010
(C) ‘C’ PROGRAMMING
(SPECIALIZATION - II)
(New 2008 Pattern)
Time : 3 Hours] [Max. Marks : 70
Instructions :
(1) Question No. 1 is compulsory.
(2) Solve any five out of the remaining questions.
Q.1) (A) Trace output and justify answer : [12]
(a) #include <stdio.h>
main( )
{
int i, n; n = 0;
for (i = 0; i < = 10; i++, printf(“%d”, i))
n++;
printf(“%d”, n);
}
(b) #include <stdio.h>
main( )
{
int k, no = 0:
k = (no < 5 ? (no < = 10 ? 100 : 200) : 500);
printf(“%d”, k);
}
(c) #include <stdio.h>
main( )
{
int i = 6720, j = 4;
while ((i % j) == 0) {
i = i/j;
j = j + 1;
}
printf(“%d”, j);
}
(B) Explain the following : (Any Two) [08]
(a) Storage Classes
(b) Dynamic Memory Allocation
(c) Arrays in C
Q.2) Write a program to print the following pattern : [10]
A BCDE
A BCD
A BC
A B
A
Q.3) Accept 10 numbers in a integer array and sort array in the descending
order. [10]
Q.4) Write user defined function to find length of the given string. [10]
Q.5) Write a recursive function to calculate x raise to y (xy
). [10]
Q.6) Write a program to generate score card of cricket match which will
accept name of player, number of balls played, number of runs scored,
wickets taken. (Use structure) [10]
Q.7) Write a program to accept file names through command line argument
and copy contents of file 1 to file 2 skipping all the vowels from
file 1. [10]
0 comments:
Pen down your valuable important comments below