Sunday, December 13, 2015

‘C’ PROGRAMMING,University Of Pune Question Paper,2010 Question Paper,M. C. M. ( Semester - I )

‘C’ PROGRAMMING,University Of Pune Question Paper,2010 Question Paper,M. C. M. ( Semester - I )
University Of Pune Question Paper
M. C. M. ( Semester - I ) Examination - 2010
‘C’ PROGRAMMING
(Old 2005 Pattern)
Time : 3 Hours] [Max. Marks : 70
Instructions :
(1) Question No. 1 is compulsory.
(2) Solve any five out of the remaining.
Q.1) (A) Find and explain output of the following programs : [12]
(a) void main( )
{
char str[] = “Escape Sequence”;
char *a, *b;
for (a = str, b = str; b < a + str/en (str) -4; b++)
printf(“%c’, * (str +b));
}
(b) #define SQUARE(X) X*X
void main( ) {
int a = 11, b;
b = SQUARE (a + 2);
printf(“b=%d”, b);
}
(c) void main( ) {
int x;
x = – 13 + 14 – 17 * 18/5 % 10;
printf(“X = %d”, x);
}
(B) Explain the following : (Any Two) [08]
(a) Recursion
(b) Dynamic Memory Allocation
(c) Break and Continue
Q.2) Write a program to accept a number n and then find sum of the integers
from 1, 1 to 2 then 1 to 3 then 1 to 4 and so on until it displays
sum of integers from 1 to n. For example input is 5, the output
will be : [10]
1
3
6
10
15
Q.3) Write a C function : [10]
int rightmost (char * S, char ch) which returns position of the rightmost
occurrence of ch in string S or –1 if ch does not occur in string S.
Q.4) Write a C program that accepts 10 integers numbers in an array and
one constant from the user and then displays counts for numbers greater
than constant, less than constant and equal to the constant from
the contents of array. [10]
Q.5) Write a program that displays the following output using nested for
loops only : [10]
A B C D E F
B C D E F
C D E F
D E F
E F
E
[3877]-11 2 Contd.
Q.6) Write a general purpose program that would count characters, spaces,
tabs and newlines in a text file. Display result. [10]
Q.7) Define a structure account with elements acc_no, acc_type, name and
balance. Write a C program that will accept data of 20 customers and
print names of customers having a balance of greater than 10,000. [10]

Friday, November 27, 2015

‘C’ PROGRAMMING,2012 Question Paper,M. C. M. ( Semester - I ),University Of Pune Question Paper

‘C’ PROGRAMMING,2012 Question Paper,M. C. M. ( Semester - I ),University Of Pune Question Paper
University Of Pune Question Paper
M. C. M. ( Semester - I ) Examination - 2012
‘C’ PROGRAMMING
(New 2008 Pattern)
Time : 3 Hours] [Max. Marks : 70
Instructions :
 (1) Q. No. 1 is compulsory.
 (2) Solve any five from the remaining.
 (3) Figures to the right indicate full marks.
Q.1) (A) Find and explain output of the following programs. Assume
suitable header files : [12]
(a) void main( ){
int x;
x = 4% 5 + 6%5;
printf(“x = %d”, x);
}
(b) void main( ){
int x = 2, y = 3;
x = ++x * ++x;
y = ++y * ++y;
x = x++ * y++;
y = y++ * x++;
printf(“x = %d\t y = %d”, x, y); }
[4277]-101 1 P.T.O.
Seat
No.
(c) #define CUBE(a) a * a * a
void main()
{
int a;
a = CUBE(5-3);
printf(“\n value of a = %d”, a);
}
(d) void main( ){
int x;
for(x = 0; x< = 5; x++)
{
switch(x){
case 2 : printf(“A”);
 continue;
case 3 : break;
case 4 :
case 5 : printf(“BB”);
 break;
defaullt : printf(“C”);
}
}
}
(B) Explain the following : (Any Two) [08]
(a) Data Storage Classes
(b) Command Line Arguments
(c) Recursion
[4277]-101 2 Contd.
Q.2) Write a ‘C’ program to display the following pattern using nested
loops : [10]
1
1 2
123
12 3 4
1 23 4 5
Q.3) Write a ‘C’ program to accept multiline text from the user till user
enters ‘g’ from the keyboard. The program should print. [10]
(a) No. of tab spaces
(b) No. of blank spaces
(c) No. of lines
(d) No. of alphabets in the given text
Q.4) Write a recursive ‘C’ function which accepts an integer number as
a parameter and returns sum of digits of that number. [10]
Q.5) Write a ‘C’ program to copy one file into another. Use command line
arguments. Do all possible validations. [10]
Q.6) Write a ‘C’ program to sort an array of 10 numbers in descending
order and display the sorted array. [10]
Q.7) Accept information of 50 students as - rollno, name, marks1, marks2.
Calculate total and prcentage of each student and store them in an
array of appropriate structure student. Display all the information in
a tabular format. [10]

Search Everything Here