Вы находитесь на странице: 1из 5

HSE II

COMPUTER SCIENCE
SCORE: 60
TIME: 2 Hrs
Max. Mark 60
1. Encapsulation is a way to impliment abstraction- Justify? (2)
Encapsulationbn D]-tbm-Kn¨v abstraction impliment sN¿mw
2. a=++a +b++ +c
a=2, b=3, c=1
find a,b,c, after executing the above statement
apI-fn sImSp-¯n-cn-¡p¶ expression excecute sNbvXvI-gn-bp-t¼mÄ a,b,c bpsS hne-sb´v?
3. The function add() can be used for adding two numbers as well as joining two strings. Which
OOP feature can be co-related ? Explain?
add() F¶ function 2 kwJy-IÄ Iq«p¶Xn\v F¶Xn\p-t]mse 2 strings tNÀs¯-gp-Xp-¶-
Xn\pw D]-tbm-Kn-¡p-¶p. OOP sâ GXv feature CXp-ambn _Ô-s¸-«n-cn-¡p¶p? hni-Zo-I-cn-¡pI?
4. Find out the errors and correct the following code
class X
{
int a ;
public :
friend void get ();
{
cin>>a;
}
apI-fn X¶n-cn-¡p¶ program code þ sX-äp-IÄ Ds−-¦n Xncp-¯p-I.
5. Write a program to read and display details empno, empname and date of joining of the
employee
using structure.
structure D]-tbm-Kn-¨v empno, empname and date of joining Ch read sN¿p-¶-Xn\pw
display sN¿p-¶-Xn\pw Bh-iy-amb program Fgp-Xp-I,
6. Consider the following function
int fn(int n)
{
if(int = =1)
return 1;
else
return n+(n-1);
}
Which type of function is this ?
What will be the output if n=4. (2)
GXp coXn-bn-epÅ function BWv apI-fn sImSp-¯n-cn-¡p-¶Xv? n=4. Bbm output F´m-bn-
cn¡pw?

OR
7. Predict the output (2)
enum elts{c=6, N,P,q=17, R,S};
elts e1, c2;
e1-p;
c2=s;
Cout << e1+e2;
apIfn sImSp-¯n-cn-¡p¶ program code sâ output {]h-Nn-¡p-I.
8. int p=1;
for(int i=-5; i<5; i++)
{
p=p*i;
cout <<p}
what will be the output?
apIfn sImSp-¯n-cn-¡p¶ program code sâ output F´mbncn¡pw? (2)
9. while (1)
{
cout<<“x”;
}
How many times the loop will execute?
apIfn sImSp-¯n-cn-¡p¶ program F{X {]mhiyw execute sN¿pw? (1)
10. Complete the following code
# include..................................
void main( )
{
ifstream, ..........................
obj. ...........................(“stud.dat”);
char name [25];
obj>>.........................;
cout<<.......................;
}
apIfn sImSp-¯n-cn-¡p¶ program code ]qÀ¯o-I-cn-¡pI (3)
11. a. “Break the line, Change the sign”, name and state the theorem
apIfn sImSp-¯n-cn-¡p¶ Bibw GXp theorem -hp-ambn _Ô-s¸-«n-cn-¡p-¶p.
b. Drain the logic circuite to add 3 bits. (2)
3 bit add sN¿p¶ logic circuite hc-bv¡pI
OR
12. “DBMS replaces conventional file system.” Justify (5)
apIfn ]dªn-cn-¡p¶ statement justify sN¿p--I.
13. Explain different access method used in data communication ? (3)
Data communication  D]-tbm-Kn-¨n-cn¡p¶
]e Xc-¯n-e¡p access method hni-Zo-I-cn-¡pI
14. Predict the output and give reasons?
class ABC
{
int p,q;
public :
void get (int a, int b)
{
x=a;
y=b;
void display ( )
{
cout<< x<<y;
}
};
void main ( )
{ ABC p1q;
p.get (5,6)
q.display ( );
} (3)
apIfn sImSp¯n-cn-¡p¶ program code sâ output F´m-bn-cn-¡pw ? ImcWw hni-Z-am-
¡p-I.
15. Predict the output and give resons?
class X
{
static int a;
public :
void display ( )
{
cout<<++a;
}
};
int X:: a;
void main ( )
{
X ob1, ob2;
ob1.display( )
ob2.display( )
} (3)
apI-fn sImSp-¯n-cn-¡p¶ program code sâ out put F´m-bn-cn¡pw? ImcWw hni-Zo-I-
cn-¡pI
16. Consider the following prototype
float volum (float x);
float volum (float r, float h);
float volum (float l, float b; flot h)
Which OOP concept is being used here. Explain? (3)
apI-fn sImSp-¯n-cn-¡p¶ GXv OPP concept BWv? hni-Zo-I-cn-¡pI
17. What is the different between
Time T2 (T1)
Time T2 = T1 (2)
c−v statement IÄ X½n-epÅ hyXymkw F´v?
OR
18. class con
{
int x,y;
con ( )
{
x=0;
y=0;
}
};
void main ( )
}
con c;
After completation an error will occer. What is the reason ? (2)
apI-fn sImSp-¯n-cn-¡p¶ code compile sN¿p-t¼mÄ error D−m-Ip-¶p. Imc-W-sa´v
19. Identify the different types of inheritance in the given figure

B C

(3)
20. What is the difference between

a[2] nd *(a+2) (2)


a [2] and *(q+2) Ch X½n-epÅ hyXym-k-sa-gp-XpI
21. What is orphaned memory (2)
orphaned memory F¶m-se´v?
22. What will happen when the following c code fiagment is excecuted?
of stream out;
out. open ( sample .txt, 10s: : app if n-cn-¡..............);
apI-fn X¶n-cn-¡p¶ code excecute sN¿p-t¼mÄ D−m-Ip¶ result F´m-bn-cn¡pw
out.open(“sample.txt”, ios::app ios:: nocredit)
23. create a table student with the fields
Admno Integer primary ket
name char (25)
course char (40)
percent integer
write SQL quries to
1. Display name and percentage of those students studying either Science or Commerce.
2. Display the details of students in ascending order of their name.
3. Display the number of students in each course.
4. Display the names of all students starting with the letter ‘S’
1. kb³kv {Kq¸ntem sImtagvkv {Kq¸ntem ]Tn-¡p¶ Ip«n-I-fpsS name, percentage Ch
display sN¿pI.
2. Ip«n-I-fpsS details Name sâ Btcm-lW {Ia-¯n display sN¿pI.
3. Hmtcm tImgvknepw DÅ Ip«n-I-fpsS F®w display sN¿pI.
4. ‘S’ XpS-§p¶ names display sN¿pI.
24. In order to implement new system different methods can be used, Explain? (3)
]pXnb Hcp system impliment sN¿p-¶-Xn\pÅ hnhn[ coXn-IÄ Fs´Ãmw?
25. ........................... is a tool used for geographical representation of data movement,
process and files used in analysis phase (1)
Geographical representation th−n analysis Phase D]-tbm-Kn-¡p¶ tool BWv.
26. .............. hardwere equipment is used to regulate the transmitted signal.
(1)
....................... Heardweare signal regenerate sN¿m\p-]-tbm-Kn-¡p-¶p. 

Вам также может понравиться