How To Exam?

a knowledge trading engine...


University of Mumbai 2004 B.E Computer Science COMPUTER PROGRAMMING - I (E) - Question Paper

Sunday, 14 July 2013 04:25Web

COMPUTER PROGRAMMING -I (JUNE 2004)
N. B.:
(1) Question Nos. one is compulsory.
(2) Attempt any 4 questions, out of remaining 6 ques..
part I
1. i) elaborate the security rights associated with files and directories in UNIX ? (3)
ii) Write range of long signed int, double and unsigned char. (3)
iii) discuss any 3 bitwise operators in C. (3)
iv) discuss 4 kinds of files in UNIX. (3)
w) What is modular programming ? What are the characteristics and advantages of modular programming ? (3)
vi) What will be the output of subsequent program :- (5)
main ( )
{
floaty =24.5874;
printf("% 7.4f",y);
printf("% 7.2 f\y);
printf("% -7.2f",y);
printf("% 10.2e",y);
printf("% 11.4e", -y);
}
(a) Write commands at UNIX prompt $ for the following: (any six):- (6)
i) To print info about active process.
ii) To search for a trend in a file.
iii) To sort the contents of a file in reverse order.

iv) To change current '$' prompt to '#' prompt.
v) To display date and time.
vi) Tomove'yourfile".
vii) To, list the processes which are running.
(b) i) What is recursive function? discuss with suitable examples. (7)
ii) Write a recursive function ? 'Rev' to reverse a number entered by the user. (7)
(a) The subsequent set of numbers is popularly known as 'Pascal's triangle. (10)
1 1
1 2 1
1 3 3 1
1 4 6 four 1
1 5 10 10 five 1
If we denote rows by i and columns by j , then any element (except the boundary elements) in the triangle is provided by - Pij =Pi-1,j-1 +Pi-1 , j
Write a program to compute the elements of the Pascal triangle of 06 ' rows and print the outcomes.
(b) i) A square matrix that is, 1 having the identical number of rows and columns, is called a diagonal matrix if its only non-zero elements are on the diagonal from upper left to lower right. Write a program that reads a matrix and checks if it is diagonal matrix. (5)
ii) Write a program to obtain GCD and LCM for 2 numbers entered by user. (5)
4.(a) i) discuss various operators in C. Also discuss precedence and associativity of operators. (8)
ii) Write the C Program to count and to display total no of vowels contained in user input string. (8)
5. (a) discuss various storage classes in C. (8)

(b) What will be the output of subsequent programs? (12)
i) main ( ) iii) main ( )
{ intx- 10,y,z; {floata = 0.5, b = 0.9 ;
z=y=x; if(a&&b>0.9)
y- = x--; printf("IFPART");
x- = --x-x--; printf(" ELSE PART");
printf("y=%dz=%dx=%d"y,z,) }
}
ii) main ( ) . iv) main ( )
{ inta = b=c = d = e = 40; . { inti = 0;
printf("%d%d%d%d%d">a,b>c,d,e); for (; i < 100; i ++);
} printf ("This will printf hello 100 times")
}
6. (a) What will be the output of subsequent program ?
main ( )
{
staticinta[] = {0, 1,2,3,4};
static int *p [ ] = {a, a + 1, a + 2, a + 3, a + 4};
int * * ptr = p ;
printf("%d%d",a,**p); .
printf (" % d % d", p, * ptr);
}
(b) discuss the followingwith suitable example (any four):- (16)
i) Call by value ii) Break and continue on
iii) Preprocessor directives. iv) Call by address

v) Enumerated data kinds
7. (a) describe a structure called cricket that will define the subsequent information:- (10)
Player name Team name Batting avg.
using cricket", declare an array player with 50 elements and write a program to learn the info about all 50 players. Sort the structure on there batting avg. and print the outcomes.
(b) (i) Explain subsequent library functions :- (5)
i) getche ( ) iii) isalnum ( )
ii) puts ( ) iv) toupper ( )
v) stcmp(S1,S2).
(ii) What is a union ? How does a union differ from a structure ? discuss with suitable example.



( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER University of Mumbai 2004 B.E Computer Science COMPUTER PROGRAMMING - I (E) - Question Paper