phase 2 BA IT computer[1]
phase 2 BA IT computer[1]
SECTION-I (OBJECTIVE)
1- Encircle the right option among the given options for each question: (10 Marks)
iv) Which of the following header file must be included to use the setw manipulator?
a) iostream.h b) iomanip.h c) conio.h d) math.h
v) What will be the value of x after executing the following code?
x = 2;
if (x != 10) x + +;
if (x == 3) x + +;
if (x != 3) x + +;
cout << x << “ ”;
a) 2 b) 3 c) 7 d) 5
vi) The first line of function definition is called:
a) Function Header b) Function Signature
c) Functional Decelerator d) both a and c
vii) The starting address of an array is called the:
a) Memory Address b) Origional address c) base address d) None of these
viii) The data items of a structure are called:
a) Members b) Elements c) Fields d) All of these
ix) Members of objects are accessed with:
a) address operator b) dot operator
c) extraction operator d) resolution operator
x) for loop is also called
a) counter control loop b) none of these c) super class d) all of these
SECTION-B
2-
a) What is meant by CONDITIONAL OPERATOR? Write down the Rules for naming a variable. (7
Marks)
b) Write a program that inputs a three-digit number from the user and displays it in reverse order. For
example, if the user enters 123, it is displayed as 321. (8 Marks)
3-
a) What is OBJECT ORIENTED PROGRAMMING? Explain the number access specifiers of class. (7
Marks)
b) Explain Escape Sequences in detail. (8 Marks)
4-
a) Write a program that declares a structure to store Roll No, Marks, Average, and Grade of a student. The
program should define a structure variable, input the values, and then display these values. (7 Marks)
b) Write a class that contains two integer data members which are initialized to 100 when an object is
created. It has a member function average that displays the average of data members. (8 Marks)
SECTION-C
5-
a) What are the different Types of DATA STRUCTURES? Explain the operations that can be performed
on data structures. (8 Marks)
b) Write an algorithm to insert an item at the end of an array. (7 Marks)
6-
a)Define types of sub algorithms.(7 Marks)
b) What is SORTING? Use the Bubble Sort to sort an array of ten integer elements. (8 Marks)
7-
a) Define Searching and it’s types . (7 Marks)
b) Define Sequential Search with program example.(8 Marks)
Total copies : 05