Programming s1 2019-20

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Rurdwani

1níversity

BE-I/ESC-CSE-10I/19

B.E. 1st Semestermnation, 2019-20


Subject : Programming for Problem Solving
Paper : ESC-CSE-101
(New)
Time: 3 Hours Full Marks: 70

The figures in the margin indicate full marks.


Candidates are required to give their answers in their own words
as far as practicable.
Answer question no. 1and any four questions from the rest.
Instructions: write all parts of a question together in one place.
1x10=10
1. Answer the following questions:
(a) How is a Cprogram compiled usually?
(b) Write a command to print out the number 22.
(c) Write two reserve keywords in C.
(d) What is an identifier?
(e) What is an algorithm?
() Write a statement to declare two integers called as i and j.
(g) How is a variable declared as a pointer?
(h) Is there anything wrong with a function which returns no value?
(i) Which loop is always executed at least once?
() What do you mean by unary operator?

2. (a) Explain the basic structure of computer with suitable diagram.


(b) What are the basic data types used in C language?
between three numbers. 5+5+5=15
(c) Draw a flowchart to find the maximum number
example.
3. (a) Explain difference between do-while and while loop with
(b) Distinguish between binary minus and unary minus.
5+4+6=15
(c) Write a 'C' program to find the sum of n numbers.

4. (a) How are the elements accessed in a two dimensional array?


number from an array
(b) Write a C language program to enter n elements in array and find target
using binary search.
keyboard and print whether it is
(c) Write a program to accept the value of year as input from the 5+6+4=15
a leap year or not.
Please Turn Over
16893
BE-/ESC-CSE-10I/19 (2)

5. (a) Write a program in Cto draw thè following pattern.

(b) Consider the following numbers:


24,9, 16, 54, 36, 3, 12, 8
Arange the numbers using bubble sort method.

6. (a) Explain the working of break' and 'continue statements.


(6) Distinguish between »call by value and 'call by reference' with example.
(c) Write a function in C language to find the Fibonacciseries of n numbers. 5454

7. (a) What is the difference between a structure and a union?


(b) Write aC language program to find factorial of agiven number using recursion.
(c) Write a C language program to define structure for student details containing name. rolI
department. Then read 5 records and display it. 3+6+

8. (a) Explain pointer with suitable example.


(b) For what purpose \0 is used in string operations.
(c) Discuss about any four string handling functions. 5+2+

9. (a) Explain pointers to an array with examples.


(b) Explain the following with example:
fprintf), fscanf(), getc), feof() +

You might also like