Solapur University Question Paper
B.Sc. (Part – III) (Semester – VI) Examination, 2014
STATISTICS (Special Paper – XVI)
C-Programming
Day and Date : Tuesday, 15-4-2014 Max. Marks : 50
Time : 11.00 a.m. to 1.00 p.m.
N.B.: 1) All questions are compulsory.
2) Figures to the right indicate full marks.
1. Select the most correct alternative : 10
i) C language has been developed at
a) Microsoft Corp., USA b) AT & T Bell Labs, USA
c) Borland International, USA d) IBM, USA
ii) The expression, a = 7/14*(4.6 + 2)*2/8; evaluates to
a) 0.825 b) 2.8 c) 4.6 d) 0
iii) If b is an integer then b = 8% – 3; will return a value
a) 2.66 b) –2.66 c) 2 d) – 2
iv) The C-program execution always begin with the function
a) main ( ) b) scanf ( ) c) printf( ) d) none of these
v) Which of the following statement is used to jump out of a loop instantly,
without waiting to get back to the conditional test in a C-program ?
a) continue b) break c) goto d) none of these
vi) The following assignment statement :
x = x *
a; can be expressed in compound assignment operator as
a) x *
= a; b) x = *
a; c) x% = a; d) x *
a =;
Seat
No.
SLR-C – 192 -2-
vii) If P1 is an integer pointer with an initial value, say 2012, then after the
operation P1 = P1 – 1; the value of P1 will be
a) 2011 b) 2010 c) 2008 d) none of these
viii) An array is a group of related data items that has a
a) different names b) common name
c) common number d) none of these
ix) If n = strcmp (string1, string 2); and n = 0 then
a) string 1 is identical to string 2 b) string 1 is above to string 2
c) string 2 is above string 1 d) none of these
x) Which mode is used to open a file for writing purpose ?
a) r b) w c) a d) none of these
2. Attempt any five from the following : 10
i) What are the rules for constructing integer constants ?
ii) Explain the ternary (conditional) operator in C-program.
iii) Explain if statement in C-programming.
iv) Explain the use of pointer in C-programming.
v) Explain puts() with illustration.
vi) Explain ‘\n’ and ‘\t’ of escape sequence.
3. A) Attempt any two from the following: 6
i) What will be the statement -wise output of the following program ?
# include < stdio.h>
# include < math.h>
main ()
{ int a = 7, b, c;
b = a++;
c = ++a;
printf (“\n a = %d \n b = %d \n c = %d”, a, b, c);
}
ii) Explain closing a file with illustrations.
iii) Explain scope rule of function in C-program.
B) Write a C-program to determine whether the given number is prime or not. 4
4. Attempt any two from the following : 10
i) Explain do-while statement with illustration.
ii) State the general form of array declaration in one-dimensional arrays. Write
a C-program to find average marks obtained by a class of 20 students in a
test by using an array.
iii) Explain passing pointer as parameters (arguments) of function.
5. Attempt any two from the following : 10
i) Explain the scanf function with illustration
ii) Explain recursion with illustration
iii) The marks obtained by a student in a particular subject is input through the
key board. The student gets a grading according to the following rules :
Marks Grade
80 to 100 O
60 to 79 A
50 to 59 B
40 to 49 C
0 to 39 D
Write a C-program that the grade obtained by the student, using switch
statement.
———————
0 comments:
Pen down your valuable important comments below