You are on page 1of 3

GEMS WORLD COLLEGE (Dhamyal Campus)

Pre Board Exam- 2024


Subject: Computer Total Marks: 13 Time Allowed: 20 min
Student Name: _____________ Father Name: _______________ Class: 2nd Year
Section-A
Choose the correct option.
1. Which one of the following states transition is valid?
a) Ready to blocked b) Blocked to running
c) Running to ready d) Terminated to running
2. In which SDLC phase the project phase must decide whether the project should go ahead with
available resources or not :
a) Coding phase b) Analysis phase
c) Maintenance phase. d) planning phase
3. Which one of the following DOS command is used to display content of the directory?
a) DIR b) CD c) MD d) VIEW
4. Identify the type of conversion in which the old system is directly replaced by the new system.
a) Pilot b) Parallel c) Direct d) Phased
5. If a=10;b=A++; what will be the value of b?
a) 1 b) 9 c) 10. d) 11
6. Which one of the following statements transfers the control to the start of loop body?
a) Break b) Exit c) Switch d) Continue
7. If x=5,which one of the following accesses the seventh element stored in an array A?
a) A[x++] b) A[++x] c) A[7] d) A[x]
8. The phenomenon of having two or more functions in a program with a same name but different numbers
and types of parameters is called.
a) A Inline function b) Nested
c) Function overloading d) Recursive
9. The deference operator is denoted by:
a) * b) & c) ** d) &&
10. Which one of the following indicates the address of a variable’temp’of type float?
a) temp& b) float temp & c) &temp d) &float temp
11. Identify the header file needed to read, write and manipulate the file.
a) Ofstream b) Ifstream c) Fstream d) Istream
12. Which one of the following is the default access specifier of C++ class?
13. Which one of the following functions is used to write a single character to.
a) get( ) b) gets( )
c) put ( )
d) writer( )
GEMS WORLD COLLEGE (Dhamyal Campus)
Pre Board Exam- 2024(2nd Year)
Subject: Computer Total Marks: Time Allowed: 2Hrs40 min
Section -B
Ǫ. 2: Attempt all parts from the following. All parts carry equal marks.
1. Why is memory management required? Give any three reasons.
2. Write down the reasons of following invalid variables names:
a) 3a. b) S$. c) long
3. Write down any three differences between text and binary files?
OR
How is constructor different from destructor? List down any three differences.
4.Write down any three responsibilities of system analyst.
5.What will be displayed after executing the following statements ?
Int x = 3,y = 7
Cout << x/ y <<y/x << (y/x) + (x%y);
OR
Write down the output of the following statements.
a) A=(x>0) &&(y<10). When x= 5 y = 15
b) S=13+ 21 %4
c) M*=2 when m=12
6. Write down the purpose and syntax of break statement.
OR
Write down the purpose and syntax of exit ( ) function .
7. Why is it important to write comments in a program? Also differentiate its two types.
8. Write down the output of the following program segment.
Char c=’A’; do
{
cout << c << “/t” c=c+2;
}
(While c<=’K’);
OR
Write down the output of the following program segment.
int values[ ]=[4,17,19,23]
cout<<values[2]<< “/n”; cout<<++values
[0]<<”/n”; cout<<values [1]++<<”/n”;
9. Rewrite the following statements using if-else statement.
Cout<<( ( ( num %2 ) ==0) “Even/n “:Odd / n”)/;
10. What is the difference between a ray size and index. Elaborate with example.
11. Compare local and static variable in terms of scope, Life Time and storage duration .
OR
Write down any three differences between actual and formal parameters.
12.Rewrite the program segment after removing error :
Int a {10} , i”
Cout >>”enter ten numbers ; ( for I = 0 ; I
<10 ; I -)
Cin <<a{I };
OR
Consider the array definition . Float table[5][5]:
a)How many elements does an array have?
b)Write statements that assigns 36.5 to the first element of array.
13. What is th reference operator? Give example.
OR
Write down the purpose of streat( ) function with examples.
14. Define a class student that contains public data members including function get( ).
Section –C
Ǫ. 3:Write a C++ program that displays the following menu:
Geometry calculator
1. Display area of a circle
2. Display area of a rectangle Enter your choice (1-3).
If user enters 1,the program should ask for the radius of the circle and then display its area. Use formula
area=πr^2.
If user enters 2, the program should ask for the length and width of the rectangle and then display its area.
Use formula area=length × width.
Display an error message if the users enter a number outside the range 1-3.
Ǫ. 4:What is the importance of SDLC? Explain in detail the feasibility and testing phases.
OR
Explain the batch processing and real time operating system with one example of each.
Ǫ. 5: Explain the concept of polymorphism and inheritance with one example of each from life.
OR
Consider the following statements and complete the following table: Line no. Statement. Purpose
1.Fstream datafile. 2.datafile.open(“datafile.txt”,ios::in);
3.if(!datafile) 4.datafile >>ch;
5.datafile. Close( );
Ǫ. 6: Write a program that prints the products of three numbers by using default arguments in function.
OR
Write a C++ code that defines a function name Celsius, that takes Celsius temperature as an argument,
and returns its equivalent temperature in Fahrenheit. (Use formula:F=9/5 C+32).

You might also like