Manipal University 2010 B.Tech Computer Science and Engineering First semester b.e make up - problem solving using computers (cse-101/102) - Question Paper
H 511*1 sTfll
Reg No. |
MANIPAL INSTITUTE OF TECHNOLOGY (Constituent Institute of Manipal University)
y
INSPIRED BY LIFE
MANIPAL-576104
FIRST SEMESTER BE DEGREE MAKE UP EXAMINATION
PROBLEM SOLVING USING COMPUTERS (CSE-101/102)
Note: 1. Answer any 5 full Questions
2. Answer to the point.
3. Missing data may be assumed suitably.
4. Answer the questions in the order of question number.
IA. List and explain the various types of ROM memory. 3 Marks
IB. Explain the different symbols used in flowcharts 2 Marks
IC. Describe the various basic data types of C++. 2 Marks
ID. Define a variable. What rules are to be followed while naming variables? 3 Marks
2A. In what order the operations in the following expression is carried out?
Give all steps and the final result.
9-12/(3+3)*(2-1)*5 3 Marks
2B. The straight line method of computing the yearly depreciation of the value of an item is given by D=(PurchasePrice - SalvageValue) /Years of Service.
Write a program to compute depreciation when PurchasePrice, SalvageValue and Years of Service are given. 3 Marks
2C. Give the general format of else if ladder and switch statement along with its flow chart. 4 Marks
3A. Write a program to
(i) Accept the elements into a matrix A of order m x n and elements into a matrix B of order p x q
(ii) Display the matrices A and B in matrix form
(iii) Multiply the elements of the two matrices A and B and store it in matrix C and display the resultant matrix C in matrix form
(1+1+3= 5 Marks)
3.B. Write a C++ program to evaluate the summation of the Cosine series up to n
specified terms 5 Marks
4A. Explain with syntax the built in string handling functions for performing the following operations.
(i) Determining the length of the string
(ii) Concatenating two strings. 4 Marks 4B. Write a C++ program to accept elements into a 1D array and sort the elements in
descending order using bubble sort technique and display the same. 4 Marks
4C. Differentiate between entry controlled and exit controlled loops with examples.
2 Marks
5A. Declare a structure book containing the members authorname, pages and price.
Create an array of 3 structure variables and initialize it with values. 3 Marks
5B. Write a function to read array elements.
Write a function which takes as arguments the array name and size of the array and returns the average of all the elements of the array.
Use these two functions in the main appropriately to read and find the average. Display the array elements and the average in the main program. 4 Marks
5C. Which of the bitwise operator retains its original value when it is applied on two operands having same value. Explain with example. 2 Marks
5D. List all the storage class of variables 1 Mark
6A. Create a class called car with member variables colour, cost, year of manufacture . Add member functions getdetails and display. getdetails is defined within the class, which takes all the information from the user. Another member function display defined outside the class which displays all the information. Instantiate an object of the class and invoke these functions on the object in appropriate order. 4 Marks 6B. Explain the difference between the macros and functions 2 Marks
6C. Find the output of the following: main()
{
int a[] = {1,2,9,8,6,3,5,7,8,9}; int *p= a+1; int *q= a+6;
cout<< q-p <<*p+*q; } 2 Marks
6D. What are local and global variables? 2 Marks
Page 2 of 2
Attachment: |
Earning: Approval pending. |