Gujarat Technological University: Instructions
Gujarat Technological University: Instructions
Gujarat Technological University: Instructions
: _____
Enrolment No.______
Instructions:
1. Attempt all questions. 2. Make suitable assumptions wherever necessary. 3. Figures to the right indicate full marks. Q.1 (a) Answer the following Questions.
(i) Explain in brief the features of C language. (ii) Explain logical operator and relational operator used in C language. (iii) Draw a flow chart to find the smallest number out of three given numbers. (b) What is structure? How do we declare and access structure variables?
12
02 07
Q.2
07
Q.3
05 04 05 04
Q.3
(b) Write a program to convert temperature entered by user from Fahrenhit into Celcius. 05 (c) Write a C++ program which is having class named student .It has two member 05
functions named read_data() and print_data(). It has member elements called Rollno,Name and Percentage. Assume suitable data type for variable. And read the data from the user and print the same on the screen using above functions.
Q.4
(a) Write a program to read two 5 X 5 matrices from the user and store the Addition of
two matrices in the resultant matrix. i.e. C=A + B , where A,B,C each one is 5 X 5 Matrix. Write the short notes on following. (b) (i) Polymorphism (ii) (ii) Difference between Object Oriented and Procedure Oriented language. OR What is pointer? Give its benefits. Write a program to do swapping of two elements (a) using function with two pointers as arguments. (b) Write the short notes on following. (i) Inheritance. (ii) Friend Function. 1
06 08
Q.4
06 08
Q.5
(a) Explain the syntax of switchcase statement. Write a program using switchcase
statement. (b) Write a program to print the following triangle for n lines * * * * * * * * * * upto n such Lines
04 06
(c) Q.5
04 05 05 04
OR (a) Explain the different data types of C language (b) Write a C Program to check whether the given number is prime or not. (c) What is inline function? Explain with example.
*************