Vous êtes sur la page 1sur 7

PAPER B

WRITTEN TEST PAPER FOR SELECTION OF TEACHERS : CSB 2011


COMPUTER SCIENCE / I P PGT: SUBJECT CODE: (P51)

1. Each time you turn on your computer, it will


check for the following control file(s)
(a) io.sys, Command.com
(b) dir.com, Command.com, date.com
(c) io.sys, msdos.sys Command.com
(d) Chkdsk.exe

9. Which of the following is not a transmission


medium?
(a) Modem
(b) Coaxial cables
(c) telephone lines
(d) Microwaves
10. Which of the following is considered a broad
band communication channel?

2. Which command is used to delete the directory


that is empty?

(a) Coaxial cable


(c) Microwaves circuits

(a) RD

11. In OOPs, when a Method behaves differently


with different massages, it is called

(b) Del *.*

(c) MD

(d) CD

3. In which year the first operating system was


developed
(a) 1910

(b) 1940

(c) 1980

(d) 1950

(b) C:\windows\system32
(d) C:\

5. Which command displays the list of all previous


commands entered by the used?
(a) COMMANDS/ALL
(c) DIR/ALL

(b) KEYDOS
(d) DOSKEY

6. In OSI network architecture, the dialogue control


and token management are responsibility of which
layer
(a) Network (b) Session (c) Transport (d) Data
7. Which of the following communication modes
support two-way traffic but in only one direction at
a time?
(a) Simplex
(c) Half Duplex

(b) Encapsulation
(d) Inheritance

12. Reusability is a feature of OOPs implemented


through

4. Where do you find user.dat?


(a) C:\windows
(c) C:\windows\system

(a) Data Abstraction


(c) Overloading

(b) fiber optics cable


(d) All of above

(b) Duplex
(d) All the above

(a) Classes
(c) Encapsulation

(b) Objects
(d) Inheritance

13. In C++ following is the ONLY Difference


between do-while and while loop is
(a) do-while will NOT be executed even once.
(b) do-while is exit restricted loop where as while is
entry restricted loop.
(c) do-while will be executed atleast 2 times and
while loop once.
(d) None of the above.
14. Data types in C++ are broadly classified as
(a) int, char, float
(b) array, class, struct
(c) signed-unsigned, short, long
(d) built-in, user defined, derived

8. How many OSI layers are covered in the X.25


standard?
(a) Two
(b) Three
(c) Seven
(d) Six
15. Consider the following class
-1-

class MY
{
int a;
public:
MY(int x){a=x;}
void print() {cout<<a;}
}obj;

20.
#include <IOStream.H>
void main()
{
int a=15, b=10;
cout<<++a<<" "<<++b<<" "<<a<<" "<<b;
}

Point out error, if any.

(a) 16 11 16 11 (b) 15 10 16 11 (c) 16 11 15 10


(d) No Output-error

(a) class cant be defined like this.


(b) Declaration of MY(int) is invalid.
(c) Definition of obj is invalid.
(d) No error.
16.

21.
#include <IOStream.H>
void main()
{
int a=32, *p=&a;
char c='A', &d=c;
d+=a;*p+=c;
cout<<a<<" "<<c;
}

What is new in C++?

(a) operator

(b)function

(c) statement (d) object

17. Which of the following is NOT an example of


STATIC allocation of memory?

(a) 129 a
(a) int a;
(c) linked list

(b) Objects of a class


(d) arrays

18.
#include <IOStream.H>
void main()
{
int a[]={5,7,9,11,14};
int *p=a+2;
cout <<++*p++;
}
(b) 10

(c) 11

(a) YOUR
(c) MY MY

(d) 7

19.
#include <IOStream.H>
void main()
{
int p[]={2,6,7,1,7};
for(int i=1;i<3;i++)
cout<<i[p]<<" ";
}
(a) 2 6

(b) 7 1

(c) 6 7

(c) 132 a

(d) a 132

22.
#include <IOStream.H>
void print(char **c)
{
*c="MY MY";
}
void main()
{
char *p="YOUR";
print(&p);
cout<<p;
}

Find the output of the following C++ programs


(Q 18 to 23) and give appropriate option

(a) 5

(b) A 129

(b) NULL String


(d) No Output-error

23.
#include <IOStream.H>
int& print(int &a, int &b)
{ if (a>b) return a; else return b; }
void main()
{
int x=10, y=20;
print(x,y)=30;
cout<<x <<" "<<y;
}

(d) No output-error

(a) 10 30 (b) 10 20 (c) 30 20 (d) 30 30


-2-

(c) FM radio transmission


(d) Microwave communication
33. Which of the following is true of the IP address
192.0.0.10?
(a) The netid is 192
(b) The network address is 192.0.0.0
(c) The hostid is 0.10
(d) The hostid is 0.0.10

(Ques 24 to 31 are based on C++)


24. The break statement causes an exit
(a) Only from the innermost loop
(b) From the innermost loop or switch
(c) From all loops and switches
(d) Only from innermost switch
25. Which of the following statement is invalid?
(a) int a_b;
(b) int a=5, b=4;
(c) int x=y+z;
(d) int a=b=c=0;

34. What is the commonly used unit for measuring


the speed of data transmission?
(a) Bits per second
(b) Bytes per second
(c) Either a or b
(d) None of the above

26. In a class specifier, data or functions designated


private are accessible
(a) To any function in the program
(b) Only if you know the password
(c) To member functions of the class
(d) Only to the public members of the class

35. Which of the following is not an interpreter?


(a) HTTP
(b) CGI
(c) HTML
(d) JAVA
36.
A switch is device that
(a) Connects dissimilar networks.
(b) Amplifies the signal being transmitted.
(c) Divides the segment networks into different
subnetworks.
(d) Prevent the unauthorized access to/from a
network.

27. The library function exit ( ) causes an exit from


(a) The loop in which it occurs.
(b) The function in which it occurs.
(c) The block in which it occurs.
(d) The program in which it occurs.

37.
Which of the following is not an example of
FOSS (Free Open Source Software)
(a) Linux
(b) PNG
(c) MySQL
(d) Mozila FireFox

28. The setw() library function belongs to:


(a) iostream.h
(b) process.h
(c) iomanip.h
(d) none of the above.

38. A program when executed by CPU is called


(a) Thread
(b) Instruction (c) Set (d) Process

29. Assume that a class derv that is privately


derived from class Base. An object of class derv
located in main( ) can access
(a) only public members of derv.
(b) only protected members of derv.
(c) only private members of derv.
(d) only public members of base.

39.
Original ASCII has _____ possible code
groups
(a) 256
(b) 65536
(c) 64
(d) 128
40. Which of the following memory is an optical
memory?
(a) Bubble Memory
(b) CD-ROM
(c) Core memory
(d) Floppy disk

30. Which of the following operator has least


precedence?
(a) &&
(b) ++
(c) %
(d) ?:

41.
Fastest LAN is
(a) Token bus
(c) Token ring

31. What will be the output of the following


statement, if value of i=6 initially? cout<<i= =8;
(a) 8
(b) 0
(c) 6
(d) 1

(b) Ethernet
(d) FDDI

42.
The default Subnet mask is
(a) 127.0.0.1
(b) 224.0.0.0
(c) 255.255.255.0
(d) all of the above

32. The frequency range : 300 kHz to 3MHz is used


for
(a) AM radio transmission (b) TV transmission

43.
-3-

Port number of HTTP is

(a) 25

(b) 80

(c) 125

(d) 123

String s1=new String("Hello")


String s2=new String("there");
String s3=new String();
Which of the following are legal operations?
(a) s3=s1 + s2;
(b) s3=s1-s2;
(c) s3=s1 & s2;
(d) s3=s1 && s2

44.
CDMA is used in
(a) Wireless in local loop
(b) Allocating a wireless channel
(c) Both (a) and (b)
(d) None of the above

52. What is the result of the following operation?


System.out.println(4 | 3);
(a) 6
(b) 0
(c) 1
(d) 7

45.
Mozila includes which of the following
(a) A web browser
(b) An email client
(c) HTML editor
(d) All of the above

53. You are concerned that your program may


attempt to use more memory than is available. To
avoid this situation you want to ensure that the Java
Virtual Machine will run its garbage collection just
before you start a complex routine. What can you
do to be certain that garbage collection will run
when you want?
(a) You cannot be certain when garbage collection
will run.
(b) Use the Runtime.gc() method to force garbage
collection.
(c) Ensure that all the variables you require to be
garbage collected are set to null.
(d) Use the System.gc() method to force garbage
collection.

(Questions 46 to 62 are based on JAVA)


46. Which of the following lines will compile
without warning or error?
(a) float f=1.3;
(c) byte b=257;

(b) char c="a";


(d) int i=10;

47. A byte can be of what size


(a) -128 to 127 (b) -28-1 to 28 (c) -255 to 256
(d) depends on the particular implementation of the
Java Virtual machine
48. Which of the following is not keyword or
reserved word in Java?
(a) if

(b) then

(c) goto

54. Which one does not have a valueOf(String)


method
(a) Integer (b) Boolean (c) Character (d) Long

(d) while

49. What will happen when you compile and run the
following code?

55. How would you set the colour of a graphics


context called g to cyan?
(a) g.setCurrentColor(cyan);
(b) g.setColor(Color.cyan);
(c) g.setColor("Color.cyan");
(d) g.setColor("cyan);

public class MyClass{


static int i;
public static void main(String argv[]){
System.out.println(i);
}
}
(a) Error Variable i may not have been initialized
(b) null
(c) 1
(d) 0

56. Which of the following methods are invoked by


the AWT to support paint and repaint operations?
(a) repaint( ) (b) draw( ) (c) redraw( ) (d) paint( )

50. Which of the following will output -4.0

57. Which method is used to set the text of a label


object?
(a) setText( )
(b) setLabel( )
(c) setTextLabel( )
(d) setLabelText( )

(a) System.out.println(Math.floor(-4.7));
(b) System.out.println(Math.round(-4.7));
(c) System.out.println(Math.ceil(-4.7));
(d) System.out.println(Math.min(-4.7));

58. Which method returns the preferred size of a


component?
(a) getPreferred( )
(b) getRequiredsize( )

51. Given the following declarations


-4-

(c) getPreferredSize( )

(d) getLayout( )

(d) MSOFFICE version 2003 & below.


68. Which of the following dont support relational
database?
(a) dBase IV
(b) Oracle
(c) FoxPro
(d) Reflex
69. Give ONE approach to standardization storing
of data?

59. Which of the following may contain a menu


bar?
(a) A panel (b) A frame (c) An applet (d) A menu
60. In order for a source code file, containing the
public class Test, to successfully compile, which of
the following must be true?
(a) It must have a package statement.
(b) It must be named Test.java.
(c) It must import java.lang
(d) It must declare a public class named Test

(a) MIS
(b) Structured programming
(c) CODASYL specification (d) none of the above
70. The highest level in the hierarchy of data
organization is called

61.
What is the result of expression 5.45 +
"3.2"?
(a) The double value 8.6 (b) The string ""8.6"
(c) The long value 8.
(d) The String "5.453.2"

(a) Data bank (b) Database (c) File (d) Record


71. The modify operation is likely to be done after
(a) Delete
(b) Look-up
(c) Insert
(d) None of the above

62. The this reference is used in conjunction with


________ methods.
(a) Static
(b) Constant
(c) Non-Static
(d) None of these

72. An attribute of one of the table matching the


primary key of another table, is called as

63. Information can be transferred between the


DBMS and a

(a) Foreign key


(c) Candidate key

(a) Spreadsheet
(b) word processor program
(c) Graphics program (d) All of the above

73. In a relational schema, each tuple is divided into


fields called
(a) Relations
(b) Domains
(c) Queries
(d) All of the above

64. What is the language used by most of the


DBMSs for helping their users to access data?
(a) High level language (b) Assembly Language
(c) Query Language
(d) 4GL

74. Which operator is used for making range checks


in queries?
(a) LIKE
(b) IN
(c) BETWEEN (d) TO

65. In the DBMS approach, application programs


perform the
(a) Storage function
(c) Access control

(b) Key
(d) Alternate key

75. Which of the following is NOT a DML command?


(a) Insert
(b) Delete (c) Alter (d) Update

(b) Processing functions


(d) All of the above

76 Which of the following statement is true?


66. A transparent DBMS
(a) Primary key constraint cannot be disabled, it can
only be dropped.
(b) Primary key constraint cannot be disabled and
dropped.
(c) Primary key constraint can be disabled and can
be dropped.
(d) None of the above

(a) Can not hide sensitive information from users


(b) Keeps its logical structure hidden from users
(c) Keeps its physical structure hidden from users
(d) Both (b) and (c).
67. A file with extension .docx is created with
(a) MSWORD version 2007 & above.
(b) MSOFFICE version 2007 & above.
(c) MSWORD version 2003 & below.

77. NOT NULL implements


-5-

(a) Entity Integrity


(c) Domain Integrity

(b) Referential Integrity


(d) All of the above

87. To jump to new page in HTML, we use


(a) <IMG> tag
(b) <jump> tag
(c) <href> tag
(d) <a> tag

78. NOT NULL constraint can be specified at the


(a) Column level
(c) Database level

88. The default alignment of images, which are


inserted in the HTML web page, is__________

(b) Table level


(d) None of the above

(a) left (b) Inline with text


79. Which of the following operation DO NOT
belongs to CURSOR (an SQL object)?
(a) close

(b) open

(c) fetch

89. Which of the following is not a valid value for


align attribute of <IMG>?

(d) initialize
(a) top

80. What will be the output of the following


command?
> SELECT SUBSTR(ABCDEFG,3,4) from dual;
(a) ABCDEFG
(b) CDEF (c) DEF (d) ABCD

(b) bottom

(c) center

(d) middle

90. The value of #FFFFFF is


(a) White

81. SQL is ____________language


(a) Object-oriented
(c) Non-procedural

(c) right (d) middle

(b) Black

(c) Red (d) none of these

91. An XML document has a logical structure and a


________ structure.

(b) Procedural
(d) Interactive

(a) Conceptual
(c) Imaginary

82. If we write a program in a programming


language and switch to SQL when we require to use
the database, then SQL environment in use is
known as _____________SQL.

(b) Virtual
(d) Physical

Consider a Boolean Function f(a,b,c,d). It gives


1 as output when atleast three of the inputs are
1 and 0 for all other cases. Answer Ques 92 to
94.

(a) PL (b) Dynamic (c) Embedded (d) Real-Time


92. The SOP of f(a,b,c,d) will be
83. Which of the following SQL function can
operate on any data type?

(a) 3,5,6,7,9,10,11,12,13,14,15
(b) 0,1,2,4,8
(c) 3,5,6,7,9,10,11,12,13,14,15
(d) 0,1,2,4,8

(a) TO_CHAR (b) LOWER (c) LPAD (d) MAX


84. Which of the following statement is true?
(a) DDL commands are automatically committed.
(b) DDL commands are committed by commit
command.
(c) DDL commands are committed by savepoint.
(d) All of the above.

93. The POS of f(a,b,c,d) will be


(a) 3,5,6,7,9,10,11,12,13,14,15
(b) 0,1,2,4,8
(c) 3,5,6,7,9,10,11,12,13,14,15
(d) 0,1,2,4,8

85. To delete all tuples in one go from a table the


__________ command is used
(a) delete

(b) drop

(c) rollback

94. The minimal form of SOP for f(a,b,c,d) will be


(a) (a+c)(b+c)(b+c)
(b) ab+cd+bd+bc+cd
(c) ab+ac+ad+bd+bc+cd
(d) (a+b)(a+b)(b+d)

(d) truncate

86. To define the basic font size in HTML, which of


the following tag is used?
(a) size (b) basefont (c) font (d) All of the above
-6-

95. A two input OR gate is implemented with


ONLY NAND gates. How many minimum NAND
gates will be required for the same?

98. The infix form of the following postfix form P


will be
P: 3 , 5 , 7 , , 10 , + , 4 , / , /

(a) 2

(a) 3 / 5 7 + 10 / 4
(b) (((3 + 5) (7 / 10 ))/ 4)
(c) (3 / (((5 7) + 10) / 4))
(d) 3 + 5 7 / 10 / 4

(b) 3

(c) 1

(d) None

96. [A(A+B)] + [A(B+A)] + [A+B] will result


in

99. The value of the expression P in Q 98 is

(a) 0

(a) 3

(b) A+B

(c) AB

(d) 1

97. The output of the following switching circuit


will be

(c) 1

(d) 1.5

100. In a binary tree there will be _____ number of


nodes.
(a) Even

(a) PQ + PQ
(c) PQ + PQ

(b) 4.5

(b) (P+Q)(P+Q)
(d) (P+Q)(P+Q)

--- * ----- * ----- * ---

-7-

(b) Odd

(c) 2

(d) Not known

Vous aimerez peut-être aussi