## F. Y. B. S. C. - Computer Science

F. Y. B. Sc. (Computer Science) Examination, March â 2012. COMPUTER SCIENCE (PAPER - I). (Introduction to Programming and 'C' Programming). (June 2008 ... (b) What is Assembly language? ... (a) Explain the basic data types in 'C'.
Total No. of Questions - 05]

[Total No. of Printed Pages - 04

 – 1 F. Y. B. Sc. (Computer Science) Examination, March – 2012 COMPUTER SCIENCE (PAPER - I) (Introduction to Programming and ‘C’ Programming) (June 2008 Pattern) Time : Three Hours Note : (i) (ii)

Maximum Marks : 80

All questions are compulsory. Figures to the right indicate full marks.

(iii) Neat diagrams must be drawn wherever necessary.

Q. 1.

Answer all the following questions : (a)



How the software is classified?

(b) What is Assembly language? Give example. (c)

What are Library functions in C?

(d) What is escape sequence for Null character? (e)

Give syntax and use of Typecast operator.

(f)

Which function is used to calculate square root of X in ‘C’ from Math.h Library? Give syntax.

(g) ‘Function can return multiple values’. Comment. (h) Give a macro definition # define SQUARE (X) (x)*(x) What will be the output of following statement : Printf (“%d”, SQUARE (4 + 4)];

 – 1

Page 1

P.T.O.

Total No. of Questions - 05]

[Total No. of Printed Pages - 04

(i)

Explain the use of file opening modes “a” and “at”.

(j)

Explain the difference between bitwise AND and logical AND operators with the help of examples.

Q. 2.

Answer the following questions (Any Four) : (a)



Explain the basic data types in ‘C’.

(b) What is the difference between the functions getch(), getchar(), getche()? (c)

Give the difference between ‘while loop’ and ‘do while loop’ with example.

(d) What is row major and column major representation of two dimensional array and state how address of any element is calculated in each, explain with suitable example. (e)

What are command line arguments? How those are declared? What are the advantages of command line arguments.

Q. 3.

Answer the following questions (Any Four) : (a)

Write an algorithm and draw a flowchart to find largest of n numbers.

(b) What is the output of the following program? main() { char *P = “abcd”; printf(“%c”, *p++); printf(“%c\\”, *p); }

 – 1

Page 2



Total No. of Questions - 05] (c)

[Total No. of Printed Pages - 04

Find and justify the output of the following program : main() { int a = 10, b =15; change (a, & b); printf (“%d%d”, a,b); } change (int X , int *y) { x = 20; *y = 30; }

(d) Write a program using recursive function to find factorial of given number. (e)

Q. 4.

Find and justify output of the following program : main() { int x ; x  = 100; x  = 400; printf (“\n%d%d”, *x, *(x+24) + *(x+ 0)); }

Answer the following questions (Any Four) : (a) Write a program to check whether given number is Armstrong number or not.



(b) Write a program to display the following pattern : 1 2 3 4 1 2 3 1 2 1

 – 1

Page 3

P.T.O.

Total No. of Questions - 05] (c)

[Total No. of Printed Pages - 04

Write a program to find transpose of a matrix.

(d) Write a program to copy one string to another without using standard library function. Use dynamic memory allocation to accept string. (e)

Write a program to accept Item information (item no., item name, qty., price) for ‘n’ items. Store this in file and display it in well format. (Use of structure and fwrite () & fread () functions are expected).

Q. 5.

Answer the following questions (Any Two) : (a)

Differentiate between pass by value and pass by reference.

(b) Explain the following wit