What is the minimum number of resources required to ensure that deadlock will never occur, if there are currently three process p1 p2 and p3 running in a system whose maximum demand for the resources of same type are 3,4 and 5 respectively.
A
3
B
7
C
9
D
10
Question 502Single Answer
Consider the following statements about the context free grammar
G = {S→SS,S →S→ab,S→ba,S→}
1. G is ambiguous
2. G produces all strings with equal number of a’s and b’s
3. G can be accepted by a deterministic PDA.
Which combination below expresses all the true statements about G?
A
1 only
B
1 and 3 only
C
2 and 3 only
D
1,2 and 3
Question 503Single Answer
For a software project, the spiral model was employed. When will the spiral stop?
A
When the software product is retired
B
When the software product is retired after Beta testing
C
When the risk analysis is completed
D
After completing five loops
Question 504Single Answer
Given a block can hold either 3 records or 10 key pointers. A database contains n records, then how many blocks do we need to hold the data file and the dense index
A
13n/30
B
n/3
C
n/10
D
n/30
Question 505Single Answer
If L and are recursively enumerable then L is
A
regular
B
context-free
C
context-sensitive
D
recursise
Question 506Single Answer
Let R =(A,B,C,D,E,F) be a relation scheme with the following dependencies Which of the following is a key of R ?
A
CD
B
EC
C
AE
D
AC
Question 507Single Answer
Dirty bit is used to indicate which of the following?
A
A page fault has occurred
B
A page has corrupted data
C
A page has been modified after being loaded into cache
D
An illegal access of page
Question 508Single Answer
Computation
S→aSa|bsb|a| b
The language generated by the above grammar over the alphabet{a,b} is the set of
A
all palindromes
B
all odd length palindromes
C
Strings that begin and end with the same symbol
D
all even length palindromes
Question 509Single Answer
Which of the following is not a valid multicast MAC address?
A
01 :00:5E:00:00:00
B
01:00:5E:00:00:FF
C
01:00:5E:00:FF:FF
D
01:00:5E:FF:FF:FF
Question 510Single Answer
What is the highest type number that can be assigned to the following grammar?
S →Aa,A→Ba,B →abc
A
Type 0
B
type 1
C
type 2
D
type 3
Question 511Single Answer
Access time of the symbolic table will be logarithmic if is implemented by
A
Linear list
B
Search tree
C
Hash table
D
self organization list
Question 512Single Answer
Recursive descent parsing is an example of
A
Top-down parsers
B
Bottom-up parsers
C
Predictive parsers
D
None of the above
Question 513Single Answer
If D1.D2…DN are domains in a relational model , then the relation is a table , which is a subset of
A
D1+D2+…+ Dn
B
D1xD2x…xD3
C
D1UD2U…U Dn
D
Question 514Single Answer
A top-down parser generates
A
Rightmost Derivation
B
Rightmost derivation in reverse
C
Leftmost derivation
D
Leftmost derivation in reverse
Question 515Single Answer
Relative mode of addressing is most relevant to writing
A
Co-routines
B
Position-independent code
C
Shareable code
D
Interrupt Handlers
Question 516Single Answer
The rank of the matrix is________.
A
0
B
1
C
2
D
3
Question 517Single Answer
A simple two-pass assembler does with of the following in the first pass:
A
Checks to see if the instructions are legal in the current assembly mode
B
It allocates space for the literals.
C
It builds the symbol table for the symbols and their values.
D
All of these
Question 518Single Answer
Peephole optimization is from of
A
Loop optimization
B
Local optimization
C
Constant folding
D
Data flow analysis
Question 519Single Answer
What is the median of data if its mode is 15 and the mean is 30?
A
30
B
25
C
22.5
D
27.5
Question 520Single Answer
At a particular time of computation the value of a counting semaphore is 7.Then 20 P operations and x V operations were completed on this semaphore. If the new value of semaphore is 5,x will be
A
18
B
22
C
15
D
13
Question 521Single Answer
With single resource, deadlock occurs
A
if there are more than two processes competing for that resources
B
if there are only two processes competing for that resources
C
if there is a single process competing for that resources
D
None of the above
Question 522Single Answer
Consider the following schema:
Employee (name, sex, salary, dept Name)
Consider the following SQL query
SELECT dept name
FROM Employee
WHERE sex =^ M ^
GROUP by Deptname
Having avg (salary)>(select avg (salary) from EMP}
The output will be
A
Average salary of male employee is the average salary of the organization
B
Average salary of male employee is less than the average salary of the organization
C
Average salary of male employee is equal to the average salary of the organization
D
Average salary of male employee is more than the average salary of the organization
Question 523Single Answer
An organization is granted the black 130.34.12.64/26.it needs to have 4 subnets. Which of the following is not address of this organization?
A
130.34.12.124
B
130.34.12.132
C
130.34.12.70
D
130.34.12.132
Question 524Single Answer
A system has 3 processes sharing 4 resources. If each process needs a maximum of 2 units ,then
A
Deadlock can never occur
B
Deadlock may occur
C
Deadlock has to occur
D
None of these
Question 525Single Answer
Determine the number of page faults when references to pages occur in the following order:
1,2,4,5,2,1,2,4
Assume that the main memory can accommodate 3 pages and the main memory already has the page 1 and 2,with page one having brought earlier than page 2.(LRU page replacement algorithm is used)
A
3
B
5
C
4
D
None of these
Question 526Single Answer
A web client sends a request to a web server. The web server transmits a program to that client and executed at client. it creates a web documents what are such web documents called?
A
Active
B
Static
C
Dynamic
D
Passive
Question 527Single Answer
Working set (t, k) at an instant of time t is
A
the set of k future references that the OS will make
B
the set of future references that the OS will make in next t unit of time
C
The set of k references with high frequency
D
the k set of pages that have been referenced in the last t time units
Question 528Single Answer
What is the size of the physical address space in a paging system which has a page table containing 64 entries of 11 bit each (including valid and invalid bit) and a page size of 512 bytes?
A
211
B
215
C
219
D
220
Question 529Single Answer
A CPU generates 32-bit virtual addresses. the page size is 4 kB. the processor has a translation look-aside buffer(TLB) which can hold a total of 128 page table entries and is 4-way set associative. The minimum size of the TLB tag is :
A
11 bits
B
13 bits
C
15 bits
D
20 bits
Question 530Single Answer
Given the following expression grammar:
Which of the following is true?
A
* has higher precedence than +
B
- has higher precedence than*
C
+ and –have same precedence
D
+ has higher precedence than*
Question 531Single Answer
Which of the following is not an optimization criterion in the design of a CPU scheduling algorithm?
A
Minimum CPU utilization
B
Maximum throughput
C
Minimum turnaround time
D
Minimum waiting time
Question 532Single Answer
For the real time operating system, which of the following is the most suitable scheduling scheme?
A
Round robin
B
First come first server
C
pre-emptive
D
Random scheduling
Question 533Single Answer
In which one of the following page replacement policies,Belady’s anomaly may occur?
A
FIFO
B
Optimal
C
LRU
D
MRU
Question 534Single Answer
The number of token in the following C statements is
Printf(^^i = %d,& I =% x^^,I & i);
A
13
B
6
C
10
D
11
Question 535Single Answer
Consider the join of a relation R with a relation S .If R has m tuples and S has n tuples then the maximum and minimum sizes of the join respectively are
A
m+n and O
B
mn and O
C
m+n and|m-n|
D
mn and m+n
Question 536Single Answer
Let R(a,b,c) and S(d,e,f) be two relations in which d is the foreign key of S that refers to the primary key of R. consider the following four operations R and S
1. Insert into R
2. Insert into S
3. Delete from R
4. Delete from S
Which of the following can cause violation of the referential integrity constraint above?
A
Both 1 and 4
B
Both 2 and 3
C
All of the
D
None of these
Question 537Single Answer
Consider the following Deterministic Finite Automation M
Let S denote the set of eight bit strings whose second, third sixth and seventh b its are1.The number of strings in S that are accepted by M is
A
0
B
1
C
2
D
3
Question 538Single Answer
A computing architecture, which allows the user to use computers from multiple administrative domains to reach a common goal is called as
A
Grid Computing
B
Neutral Networks
C
Parallel Processing
D
Cluster Computing
Question 539Single Answer
The relation book (title, price) contains the titles and prices of different books. Assuming that no two books have same price, what does the following SQL query list?
Select title
From book as B
Where (select count(*)
From book as T
Where T.price>B.price)<5
A
Titles of the four most expensive books
B
Title of the fifth most inexpensive book
C
Title of the fifth most expensive book
D
Titles of the five most expensive books
Question 540Single Answer
Goals for the design of the logical scheme include
A
avoiding data inconsistency
B
being able to construct query easily
C
being able to access data efficiently
D
all of the above
Question 541Single Answer
Which grammar rules violate the requirement of the operator grammar? A,B, C are variables and a,b,c are terminals
(i) A →Bc (ii) A →CcBb
(iii) A →BaC (iv) A→
A
(i) only
B
(i) and (i)
C
(i) and (ii)
D
(i) and (iv)
Question 542Single Answer
Which one of the following is a top –down parser?
A
Recursive descent parser
B
Shift left associative parser
C
SLR (k) parser
D
LR (k) parser
Question 543Single Answer
Given the relations:
employee (name,salary,dept-no),and
department (dept –no,dept-name,address).
Which of the following queries cannot be expressed using the basic relational algebra operations ?
A
Department address of every employee
B
Employees whose name is the same as their department name
C
The sum of all employees’ salaries
D
All employees of a given department
Question 544Single Answer
Which of the following is not true with respect to deadlock prevention and deadlock avoidance schemes?
A
In deadlock prevention, the request for resources is always granted if resulting state is safe.
B
In deadlock avoidance, the request for resources is always granted if the resulting state is safe.
C
Deadlock avoidance requires Knowledge of resource requirements a priori.
D
Deadlock prevention is more restrictive than deadlock avoidance.
Question 545Single Answer
Trigger is
A
Statement that enables to start any DBMS
B
statement that is executed by the user when debugging an application program
C
The condition that the system tests for the validity of the database user
D
Statement that is executed automatically by the system as a side effect a modification of the database
Question 546Single Answer
Yacc stands for
A
yet accept compiler constructs
B
yet accept compiler compiler
C
yet another compiler constructs
D
yet another compiler compiler
Question 547Single Answer
The order of a leaf node in B+ tree is the maximum number of (value, data record pointer) pairs it can hold. Given that the block size is 1 Kbytes, data record pointer is 7 bytes long, the value field is 9 bytes long and a block pointer is 6 bytes long, what is the of leaf node?
A
36
B
64
C
67
D
68
Question 548Single Answer
Which one of the following are essential features of object oriented language?
A. Abstraction and encapsulation
B. Strictly-typed
C. Type-safe property coupled with-sub type rule
D. polymorphism in the presence of inheritance
A
A and B only
B
A,D and B only
C
A and D only
D
A,C and D only
Question 549Single Answer
Which statements is true?
A
LALR parser is more powerful and costly as compare to other parsers
B
All CFG ^are LP and not all grammars are uniquely defined
C
Every SLR grammar is unambiguous but not every unambiguous grammar is SLR
D
LR(k) is the most general back tracking shift reduce parsing method
Question 550Single Answer
A clustering index is defined on the fields which are of type
A
non-key and ordering
B
non-key and non-key ordering
C
key and ordering
D
key and non-ordering
Important Questions Package
ISRO Computer Science Exam Online Question Bank Package
Buy ISRO Computer Science Important Questions, MCQ, question answer in Hindi & English. It will help you to score high marks in ISRO Computer Science question bank 2026 in Online, PDF & Print study material.
+ Free Monthly Current Affairs, GK & more PDF Download
Sr.
Package Name
Amount
1.
ISRO Computer Science Exam - English
Description : 1000 Question with Answer
₹101[₹500]
2.
ISRO Computer Science Exam - English
Description : 1750 Question with Answer
₹141[₹500]
3.
ISRO Computer Science Exam - English
Description : 1000 Question & Answer Download in PDF (Send by Email)
₹151[₹450]
4.
ISRO Computer Science Exam Question Bank Book - English
Description : 1000 Question with Answer (Printed Material)
₹390[₹600]
Computer Science
Question 551Single Answer
The extent to which the software can continue to operate correctly despite the introduction of invalid inputs is called as
A
Reliability
B
Robustness
C
Fault tolerance
D
Portability
Question 552Single Answer
Which languages necessarily need heap allocation in the run time environment?
A
Those that support recursion
B
Those that use dynamic scoping
C
Those that use global variables
D
Those that allow dynamic data structures
Question 553Single Answer
Which one of the following is a functional requirement?
A
Maintainability
B
Portability
C
Robustness
D
None of the mentioned
Question 554Single Answer
Semaphores are used to solve the problem of
1. Race Condition
2. Process Synchronization
3. Mutual Exclusion
4. None of the above
A
1 and 2
B
2 and 3
C
All of these
D
None of these
Question 555Single Answer
Configuration management is not concerned with
A
Controlling changes to the source code
B
Choice of hardware configuration for an application
C
Controlling documentation changes
D
maintaining versions of software
Question 556Single Answer
Consider the schema:Sailors(sid,sname,rating,age) with the following For yhe query
Si d
S name
rating
Age
22
Dusting
7
45
29
Borg
1
33
31
Pathy
8
55
32
Robert
8
25
58
Raghu
10
17
64
Herald
7
35
71
Vishnu
10
16
74
King
9
35
85
Archer
3
26
84
Bob
3
64
96
Finch
3
17
SELECT S, rating, AVG(S. age) AS avgage
From sailors S
Where S.age>=18
GROUP BY S.rating
HAVING S2 where S.rating = S2.rating)
The number of rows returned is
A
6
B
5
C
4
D
3
Question 557Single Answer
A company needs to develop a strategy for software product development for which it has a choice of two programming language L1 and L2.The number lines of code (LOC) developed using L2 is estimated to be twice of the LOC developed with L1. The product will have to be maintained for five years. various parameters for the company are given in the table below.
Parameters
Language L1
Language L2
Man years needed for development
Development cost per man year
Cost of maintenance per year
LOC/1000
10,00,000
5 years
1,00,000
LOC/10000
7,50,000
5 years
50,000
Total cost of the project includes cost of development and maintenance .what is the LOC for L1 for which of the cost of the project using L1 is equal to the cost of the project using L2?
A
4000
B
5000
C
4333
D
4667
Question 558Single Answer
If there are 32 Segments ,each size 1 k bytes,then the logical address should have
A
13 bits
B
14 bits
C
15 bits
D
16 bits
Question 559Single Answer
A company needs to develop a digital signal processing software for one of its newest inventions. The software is expected to have 20000 lines of code. The company needs to determine the effort in person-months needed to develop this software using the basic COCOMO model. The multiplicative factor for this model. The multiplicative factor for this model is given as 2.2 for the software development on embedded systems. while the exponentiation factor is given as 1.5 what is the estimated effort in person-months?
A
196.77
B
206.56
C
199.56
D
210.68
Question 560Single Answer
In the spiral model of software development the primary determinant in selecting activities in each iteration is
A
Iteration size
B
cost
C
Adopted process such as Rational Unified process or Extreme Programming
D
Risk
Question 561Single Answer
Consider a table that describes the customers:
Customers (custid, name, gender, rating) The rating value is an integer in the range 1 to 5 and only two values (male and female) are recorded for gender. Consider the query "how many male customers have a rating of 5"? The best indexing mechanism appropriate for the query is
A
Linear hashing
B
Extendible hashing
C
B+ tree
D
Bit-mapped index
Question 562Single Answer
Bit stuffing refers to
A
inserting a 0 in user stream to differentiate it with a flag
B
Inserting a 0 in flag stream to avoid ambiguity
C
Appending a nipple to the flag sequence
D
appending a nipple to the use data stream
Question 563Single Answer
Dynamic routing protocol enable routers to
A
Dynamically discover and maintain routes
B
Distribute routing updates to other routers
C
Reach agreement with other routers about the network topology
D
All of the above
Question 564Single Answer
In a lottery scheduler with 40 tickets ,how we will distribute the tickets among 4 Processes p1 p2 p3 and p4 such that each process gets 10%,5%,60% and 25% respectively?
A
P1 p2 p3 p4
12 4 70 30
B
7 5 20 10
C
4 2 24 10
D
8 5 30 40
Question 565Single Answer
Consider a disk sequence with 100 cylinders. The request to access the cylinder occur in the following sequence:
4,34,10,7,19,73,2,15,6,20
Assuming that the head is currently at cylinder 50,what is the time taken to satisfy all requests if it taken 2 ms to move from one cylinder to adjacent one and shortest seek time first policy is used?
A
190
B
238
C
233
D
276
Question 566Single Answer
In Ethernet CSMA/CD,the special bit sequence transmitted by media access management to handle collision is called
A
Preamble
B
Postamble
C
jam
D
None of these
Question 567Single Answer
Which network protocol allows hosts to dynamically get a unique Ip number on each bootup
A
DHCP
B
BOOTP
C
RARP
D
ARP
Question 568Single Answer
A counting semaphore was initialized to 7. Then 20 P (wait) operations and V(signal) operations were completed on this semaphore.if the final value of semaphore is 5,then the value will be
A
0
B
13
C
18
D
5
Question 569Single Answer
Suppose a system contains n processes and system uses the round-robin algorithm for CPU scheduling then which data structure is best suited ready queue of the process
A
stack
B
queue
C
Circular queue
D
tree
Question 570Single Answer
In a token ring network the transmission speed is 107 bps and the propagation speed is 200 meters/us. The 1 bit delay in this network is equivalent to:
A
500 meters of cable
B
200 meters of cable
C
20 meters of cable
D
50 meters of cable
Question 571Single Answer
A 32 bit adder is formed by cascading 4 bit CLA adder. The gate delays (latency) for getting the sum bits is
A
16
B
18
C
17
D
19
Question 572Single Answer
The address of a class B host is to be split into subnets with a 6 bit subnet number. What is the maximum number of subnets and the maximum number of gosts in each subnet?
A
62 subnets and 262142 hosts
B
64 subnets and 262142 hosts
C
62 subnets and 1022 hosts
D
64 subnets and 1022 hosts
Question 573Single Answer
A hard disk system has the following parameters
Number of tracks = 500
Number of sectors/ track = 500
Number of bytes / sector = 500
Time taken by the head to move from one track to adjacent track = 1ms
Rotation speed = 600 rpm.
Which is the average Time taken for transferring 250 bytes from the disk?
A
300.5 ms
B
255.5 ms
C
255 ms
D
300 ms
Question 574Single Answer
The message 11001001 is to be transmitted using the CRU polynomial X3+1 to protect it from errors. The message that should be transmitted is:
A
11001001000
B
11001001011
C
11001010
D
110010010011
Question 575Single Answer
What is the maximum size of data that the application layer can pass on the TCP layer below?
A
Any size
B
216 bytes size of TCP header
C
216 bytes
D
1500 bytes
Question 576Single Answer
Which of the following is True only of XML but not HTML?
A
It is derived from SGML
B
It describes content and layout
C
It allows user defined tags
D
It is restricted only to used with web browsers
Question 577Single Answer
Suppose A is a finite set with N elements. The number of elements and the rank of the largest equivalence relation on A are
A
{n,1}
B
{n,n)
C
{n2,1}
D
{1,n2}
Question 578Single Answer
Choose the correct alternatives (more than one may be correct) and write the corresponding letters only : At a Particular time of computation the value of a counting semaphore is 7 .Then 20 p operations and 15 v operations where completed on this semaphore. The resulting values of the semaphore
A
42
B
2
C
7
D
12
Question 579Single Answer
If a class C is derived from class B,which is derived from class A, all through public inheritance, then a class C member function can access
A
only protected and public data of C and B
B
only protected and public data of C
C
all data C and private data of A and B
D
public and protected data of A and B and all data of C
Question 580Single Answer
Consider the set of integers I. Let D denote “divides with an integer quotient” (e.g.4D8 but 4D7).Then D is
A
Reflexive not symmetric, transitive
B
Not reflexive ,Not antisymmetric,transitive
C
Reflexive, antisymmetric, transitive
D
Not reflexive ,Not antisymmetric,Not transitive
Question 581Single Answer
Which one of the following is correct about the statements given below?
1. All function calls are resolved at compile time in C lang.
II. All function calls are resolved at compile time in C ++lang.
A
only II is correct
B
Both I and II are correct
C
Only I is correct
D
Both I and II are incorrect
Question 582Single Answer
Increasing the RAM of a computer typically improves performance because
A
Virtual Memory increases
B
Larger RAM s are faster
C
Fewer page faults occur
D
Fewer segmentation faults occur
Question 583Single Answer
A bag contains 19 red balls and 19 black balls. Two balls are removed at a time repeatedly and discarded if they are of the same colour,but if they are different ,black ball is discarded and red ball is returned to the bag. The probability that this process will terminate with one red ball is
A
1
B
1
21
C
0
D
0.5
Question 584Single Answer
When a DNS server accepted and uses incorrect information from a host that has no authority giving that information, then it is called
A
DNS lookup
B
DNS hijacking
C
DNS spoofing
D
None of the mentioned
Question 585Single Answer
Which of the following algorithm solven the all pair shortest path problem?
A
Prim`s algorithm
B
Dijkstra`s algorithm
C
Bellman-Ford`s algorithm
D
Floyd Warshall`s algorithm
Question 586Single Answer
If L and P are two recursively enumerable languages, then they are not closed under
A
Kleene star L*of L
B
Intersection L P
C
Union L P
D
Set difference
Question 587Single Answer
In the context of modular software design, which one of the following combinations is desirable?
A
High cohesion and high coupling
B
High cohesion and low coupling
C
Low cohesion and high coupling
D
Low cohesion and Low coupling
Question 588Single Answer
The output of a lexical analyzer is
A
A parse tree
B
Intermediate code
C
Machine code
D
A stream of tokens
Question 589Single Answer
Consider the following program.
Main()
{fork() ;
fork () ;
fork () ;}
How many new Processes will be created?
A
8
B
6
C
7
D
5
Question 590Single Answer
If then
A
B
C
D
Question 591Single Answer
Suppose two jobs. each of which needs 10 minutes of CPU time. How start simultaneously , Assume 50% I/0 wait time. How long will it take for both to complete, if they run sequentially?
A
10
B
20
C
30
D
40
Question 592Single Answer
Which of these parts would interpret a program’s instructions to initiate the control operations?
A
Logic unit
B
Control unit
C
Storage unit
D
Input unit
Question 593Single Answer
Let f() = log || and g() = sin .If A is the range of f(g() and B is the range of g f()) then A B is
A
[-1,0]
B
[-1,0]
C
[-,0]
D
[-,1]
Question 594Single Answer
The time complexity of computing the transitive closure of a binary relation on a set n elements is know to be
A
O(n log n)
B
O(n 3/2)
C
O (n3)
D
O (n)
Question 595Single Answer
Assume that source S and Destination D are connected through an intermediate router R, How many times a packet has to visit the Network layer and data link layer during a transmission from S to D?
A
Network layer- 4 times, Data link layer- 4 times
B
Network layer- 4 times, Data link layer- 6 times
C
Network layer- 2 times, Data link layer- 4 times
D
Network layer- 3 times, Data link layer- 4 times
Question 596Single Answer
We use malloc and calloc for
A
Dynamic memory allocation
B
Static memory allocation
C
Both dynamic and Static memory allocation
D
None of the above
Question 597Single Answer
If a node has K children in B tree ,then the node contains exactly&&& Keys.
A
K2
B
K-1
C
K+1
D
Question 598Single Answer
Generally TCP is reliable and UDP is not reliable.DNS which has to be reliable uses UDP because
A
UDP is slower
B
DNS servers has to keep connections
C
DNS requests are generally very small and fit well within UDP segments
D
None of these
Question 599Single Answer
Consider the set of activities related to e-mail
A : send an e-mail from a mail client to mail server.
B : Download e-mail headers from mail box and retrieve mails from server to a cache.
C : Checking e-mail through a web browser. The application level protocol used for each activity in the same sequence is
A
SMTP,HTTPS,IMAP
B
SMTP,POP,IMAP
C
SMTP,IMAP,HTTPS
D
SMTP,IMAP,POP
Question 600Single Answer
"The linux command" mknod myfifo b 4 16”
A
Will create a character device if the user is root
B
Will create a named pipe FIFO if the user is root
C
Will create a block device if the user is root
D
None of the above
Question 601Single Answer
The time complexity of the following C function is (assume n>0)
Int recursive (int n)
{ if (n==1)
Return (1);
else
return (recursive (n-1)+recursive (n-1));}
A
O (n)
B
O (n log n)
C
O(n2)
D
O (2n)
Question 602Single Answer
Station A uses 32 byte packets to transmit messages to station B using a sliding window protocol. The round trip time delay between A and B is 40 ms and the bottleneck bandwidth on the path A and B is 64 kbps.what is the optimal window size that A should use?
A
5
B
10
C
40
D
80
Question 603Single Answer
Which of the following statements is true?
A
Hard real time OS has less jitter than soft real time OS
B
Hard real time OS has more jitter than soft real time OS
C
Hard real time OS has equal jitter than soft real time OS
D
None of the above
Question 604Single Answer
A two way set associative cache memory unit with a capacity of 16 KB is built using a block size of 8 words. The word length is 32 bits. The physical address space is 4 GB The number of bits in the TAG,SET fields are
A
20.7
B
19.8
C
20.8
D
21.9
Question 605Single Answer
Which of these is super class of all errors and exceptions in the java language?
A
Run time exceptions
B
Throw able
C
Catchable
D
None of the above
Question 606Single Answer
The number of spanning tress for a complete graph with seven vertices is
A
25
B
75
C
35
D
22x5
Question 607Single Answer
Choose the most appropriate HTML tag in the following to create a numbered lists:
Question 608Single Answer
Consider the following: List-I
A. condition coverage
B. Equivalence class partitioning
C. Volume testing
D. Beta testing List-II
p. Black box testing
q. system testing
r. White box testing
s. Performance testing
Matching A,B,C,D in the same order gives.
A
r,p,s,q
B
p,r,q,s
C
s,r,q,p
D
q,r,s,p
Question 609Single Answer
Which product metric gives the measure of the average length of words and sentence is documents?
A
SCl number
B
Cyclomatic complexity
C
LOC
D
Fog index
Question 610Single Answer
If one uses straight two-way merge sort algorithm to sort the following elements in ascending order:
20,47,15,8,9,4,40,30,12,17
Then the order of these elements after second pass of the algorithm is
A
8,9,15,20,47,4,12,7,30,40
B
8, 15, 20,47,4,9,30,40,12,17
C
15,20,47,4,8,9,12,30,40,17
D
4, 8,9,15,20,47,12,17,30,40
Question 611Single Answer
Consider the results of a medical experiment that aims to predict whether someone is going to develop myopia based on some physical measurements and heredity .In this case, the input dataset consists of the person’s medical Characteristics and the target variable is binary : 1 for those who are likely to develop myopia and 0 for those who are n‘t This can be best classified as
A
Regression
B
Clustering
C
Decision Tree
D
Association Rules
Question 612Single Answer
Consider a disk system with 100 Cylinders. The request to access the cylinders occur in the following sequences
4,37,10,7,19,73,2,15,6,20
Assuming the head is currently at cylinder 50,what is the time taken to satisfy all requests if it takes 1 ms to move from one cylinder to adjacent one and shortest seek time first algorithm is used
A
95 ms
B
119 ms
C
233 ms
D
276 ms
Question 613Single Answer
The DNS maps the IP address to
A
A binary address as strings
B
A n alphanumeric address
C
A hierarchy of domain names
D
A hexadecimal address
Question 614Single Answer
Which of the following related to snowflake schema is true?
A
Each dimension is represented by a single dimensional table
B
Maintenance effort are less
C
Dimension tables are normalized
D
It is not an extension of star schema
Question 615Single Answer
Consider the following C function:
# include
Int main(void)
{
Char c[] =” ICRBCSIT 17”,
Char *p =c ;
Printf(”%s”,c+2[p]-6[p]-1);
Return 0;
}
The output of the program is
A
SI
B
IT
C
T1
D
17
Question 616Single Answer
To add a background color for all
elements ,which of the following HTML syntax is used
A
h1 { background-color : # FFFFFF}
B
{background-color :#FFFFFF},h1
C
h1 {background-color :# FFFFFF}h1 (all)
D
h1.all{bgcolor=#FFFFFF}
Question 617Single Answer
The correct syntax to write ^^Hi there^^in java script is
A
jscript.write (^^Hi There ^^)
B
response. write (^^Hi There ^^)
C
print (^^Hi There ^^)
D
print. script (^^Hi There ^^)
Question 618Single Answer
A process executes the following code:
for (i=0,i
The total number of child processes created is
A
n2
B
2n+1-1
C
2n
D
2n-1
Question 619Single Answer
To declare the version of XML,the correct syntax is
Question 620Single Answer
A T-switch is used to
A
Control how messages are passed between computers
B
Echo every character that is received
C
Transmit characters one at a time
D
Rearrange the Connections between Computing equipments
Question 621Single Answer
Consider the following scheduling: List-I
A. Gang scheduling
B. Rate monotonic scheduling
C. Fair share scheduling List-II
S. Guaranteed scheduling
t. Thread scheduling
U. Real time scheduling
Matching the table in order A,B,C gives
A
t,u,s
B
s,t,u
C
u,s,t
D
u,t,s
Question 622Single Answer
What frequency range is used for microwave communications ,satellite and radar?
A
Low frequency :30 KHz to 300 KHz
B
Medium frequency :300 KHz to 3 MHz
C
Super high frequency :3000 MHz to 30000 MHz
D
Extremely high frequency : 30000 KHz
Question 623Single Answer
A system uses FIFD policy for page replacement .It has 4 page frames with no pages loaded to begin with. The system first accesses 50 distinct pages in same 50 pages in reverse order. How many page faults will occur?
A
96
B
100
C
97
D
92
Question 624Single Answer
How many bits internet address is assigned to each host on a TCP / IP internet which is used in all communication with the host?
A
16 bits
B
32 bits
C
48 bits
D
64 bits
Question 625Single Answer
Which of the following is false?
A
Uses level threads are not scheduled by the Kernel.
B
Context switching between user level threads is faster than context switching between kernel level threads.
C
When a user thread is blocked all other threads of its processes are blocked.
D
Kernel level threads cannot utilize multiprocessor systems by splitting threads on different processors or cores.
Question 626Single Answer
In designing a computers cache system, the cache block (or cache line) size is an important parameter. Which one of the following statements is correct in this context?
A
Smaller block size incurs lower cache miss penalty
A B-tree used as an index for a large database table has four levels including the root node. If a new key is inserted in this index, then the maximum number of nodes that could be newly created in the process are
A
5
B
4
C
1
D
2
Question 628Single Answer
Consider an instruction of the type LW R1, 20(R2) which during execution reads a 32 bit word from memory and stores it in a 32 bit register R1.The effective address of the memory location is obtained by adding a constant 20 and contents of R2 Which one best reflects the source operand
A
Immediate addressing
B
Register addressing
C
Register Indirect addressing
D
Indexed addressing
Question 629Single Answer
A critical region
A
Is a piece of code which only one process executes at a time
B
is a region prone to deadlock
C
is a piece of code which only a finite number of process executes
D
is found only in windows NT operating system
Question 630Single Answer
How many Characters per sec (7 bits+1 parity) can be transmitted over a 2400 bps line if the transfer is synchronous ( 1 start and 1 stop bit )?
A
300
B
240
C
250
D
275
Question 631Single Answer
A sorting technique is called stable if
A
If it takes o(n log n) time
B
It uses divide and conquer technique
C
Relative order of occurrence of non-distinct elements is maintained
D
It takes o(n) space
Question 632Single Answer
Chose the equivalent prefix form of the following expression
(a+(b-c))*((d-e)/(f+g-h))
A
*+a-bc/-de-+fgh
B
*+a-bc-/-de-+fgh
C
*+a-bc/-ed+-fgh
D
*+ab-c/-ed+-fgh
E
*+ab-c/-ed+-fgh
Question 633Single Answer
Match the following and chose the correct answer in the order A,B,C List-I
A. Heap construction
B. Hash table construction with linear probing
C. AVL tree construction List –II
P. o(n log n)
q. o(n2)
r. o(n)
(Bounds given may or may not be asymptotically tight)
A
q,r,p
B
p,q,r
C
q,p,b
D
r,q,p
Question 634Single Answer
What does the following program do when the input is unsigned 16 bit integer?
#include
main( )
{
unsigned int num;
int i;
scanf ("%u", &num);
for ( i = 0; i<16; i++)
{
printf ("%d", (num << i & 1 << 15 ) ? 1:0);
}
}
A
It prints all even bits from num
B
It prints all odd bits from num
C
It prints binary equivalent of num
D
None of the above
Question 635Single Answer
What is the output of the following program?
# include
Int tmp=20;
Main()
{
Print(^^%d^^,tmp);
func();
Print (^^%d^^,tmp);
}
func()
{
Static int tmp=10;
Print(^^%d^^,tmp);
}
A
20 10 10
B
20 10 20
C
20 20 20
D
10 10 10
Question 636Single Answer
Which one of the following property is correct for a red-black tree ?
A
Every simple path from a node to a descendant leaf contains the same number of black’ nodes
B
If a node is red, then one children is red and another is black
C
If a node is red, then both its children are red
D
Every leaf node (sentinel node) is red
Question 637Single Answer
The in-order and pre-order traversal of a binary tree are d b e a f c g” and “a b d e c f g” respectively. The post order traversal of a binary tree is
A
e d b g f c a
B
e d b f g c a
C
d e b f g c a
D
d e f g b c a
Question 638Single Answer
A virtual memory system uses FIFO page replacement policy and allocates a fixed number of frames to the process .Consider the following statement:
M : Increasing the number of page frames allocated to a process sometimes increases the page fault rate.
N : Some programs do not exhibit locality of reference.
Which one of the following is true?
A
Both M and N are true and N is the reason for M
B
Both M and N are true but N is not the reason for M
C
Both M and N are false
D
M is false, but N is true
Question 639Single Answer
The cyclomatic complexity of each of the modules X and Y shown below is 10.what is the cyclomatic complexity of the sequential integration shown on the right hand side?
A
21
B
19
C
20
D
10
Question 640Single Answer
In software maintenance tacking the change in the hardware or software environment where the software works, is
A
Corrective maintenance
B
Perfective maintenance
C
Adaptive maintenance
D
Preventive maintenance
Question 641Single Answer
Consider three CPU intensive processes, which required 10,20,30 units and arrive at times 0,2 6 respectively. How many context switches are needed if shortest remaining time first is implemented? Context switch at 0 is included but context switch at end is ignored
A
1
B
2
C
3
D
4
Question 642Single Answer
In CRC if the data unit is 100111001 and the divisor is 1011 then what is dividend at the receiver?
A
100111001101
B
100111001011
C
100111001
D
100111001110
Question 643Single Answer
What will be the output of the following C code?
# include
Main()
{
Int i;
for (i=0;i<5;i++)
{
Int i=10;
Print(^^%d^^,i);
i++;
}
return 0;
}
A
10 11 12 13 14
B
10 10 10 10 10
C
0 1 2 3 4
D
compilation error
Question 644Single Answer
Suppose the number 7,5,1,8,3,6,0,9,4,2 are inserted in that order into an initially empty binary search tree. The binary search tree uses the reversal ordering on natural numbers i.e.9 is assumed to be largest. The in-order traversal of the resultant binary search tree is
A
9,8,6,4,2,3,0,1,5,7
B
0,1,2,3,4,5,6,7,8,9
C
0,2,4,3,1,6,5,9,8,7
D
9,8,7,6,5,4,3,2,1,0
Question 645Single Answer
What does the following C statement declare?
Int(*f) (int*);
A
A function that takes an integer pointer as argument and returns an integer
B
A function that takes an integer as argument and returns an integer pointer
C
A pointer to a function that takes an integer pointer as argument and returns an integer
D
function that takes an integer pointer as argument and returns a function pointer
Question 646Single Answer
A priority queue is implemented as a Max-heap.lnitially it has 5 elements .The level order traversal of the heap is 10,8,5,3,2 Two new elements’ 1’ and ‘7 are inserted into the heap in that order. The level order traversal of the heap after the insertion of the elements is
A
10,8,7,5,3,2,1
B
10,8,7,2,3,1,5
C
10,8,7,1,2,3,5
D
10,8,7,3,2,1,5
Question 647Single Answer
Mutual exclusion problem occurs
A
Between two disjoint processes that do not interact
B
Among processes that share resources
C
Among processes that do not use same resource
D
Between two processes that uses different resources of different machine
Question 648Single Answer
(1217)8 is equivalent to
A
(1217)16
B
(028F)16
C
(2297)10
D
(0B17)16
Question 649Single Answer
An ACK number of 1000 in TCP always means that
A
999 bytes have been successfully received
B
1000 bytes have been successfully received
C
1001 bytes have been successfully received
D
none of the above
Question 650Single Answer
Which of the following is not a life cycle model?
A
Spiral model
B
Prototyping model
C
Waterfall model
D
Capability
Question 651Single Answer
The minimum numbers of stacks needed to implement a queue is
A
3
B
1
C
2
D
4
Question 652Single Answer
The best data structure to Check whether an arithmetic expression has balanced parenthesis is a
A
Queue
B
Stack
C
tree
D
List
Question 653Single Answer
In a class B subnet ,we know the IP address of one host and the mask as given below :
IP address :125.134.112.66
Mask : 255.255.224.0
What is the first address (Network address)?
A
125.134.96.0
B
125.134.112.0
C
125.134.112.66
D
125.134.0.0
Question 654Single Answer
Given reference to the following pages by a program:
0,9,0,1,8,1,8,7,8,7,1,2,8,2,7,8,2,3,8,3
How many page faults will occur if the program has three page frames available to it and uses and optimal page replacement?
A
7
B
8
C
9
D
None of these
Question 655Single Answer
A strictly binary tree with 10 leaves
A
Cannot have more than 19 nodes
B
Has exactly 19 nodes
C
Has exactly 17 nodes
D
Has exactly 20 nodes
Question 656Single Answer
A certain population of ALOHA users manages to generate 70 request /sec. if the time is slotted in units of 50 msec, than channel load would be
A
4.25
B
3.5
C
450
D
350
Question 657Single Answer
In a doubly linked list ,the number of pointers affected an for an insertion operation will be
A
4
B
0
C
1
D
Depends upon the nodes of the doubly linked list
Question 658Single Answer
What is the minimum height of any AVL tree with 7 nodes? Assume that height of tree with single node is 0
A
2
B
3
C
4
D
5
Question 659Single Answer
Which statements is false?
A
PING a TCP application that sends data grams once every second in the hope of an echo response from the machine being PINGED
B
If the machine is connected and running a TCP/IP protocol stack, it should respond to the PING datagram with a datagram of its own.
C
If PING encounters an error condition, an ICMP message is not returned
D
PING display the time of the return response in milliseconds or one of several error message
Question 660Single Answer
Using public key cryptography adds a digital signature o to a message M,encrypts (M,O) and sends it to Y,where it is decrypted. Which one of the following sequence of keys is used for operations?
A
Encryption: X’s private key followed by y’s private key. Decryption: X’s public key followed by Y’s public key.
B
Encryption: X’s private key followed by y’s public key. Decryption : X’s public key followed by Y’s public key.
C
Encryption : X’s private key followed by y’s public key. Decryption : y’s private key followed by x’s public key.
D
Encryption : X’s private key followed by y’s private key. Decryption : y’s public key followed by x’s private key.
Question 661Single Answer
Consider the following C function
Void swap (int x,int y)
{
Int tmp;
tmp=x;
x=y;
Y=tmp;
}
In order to exchange the values of two variables a and b:
A
Call swap (a,b)
B
Call swap (&a,&b)
C
swap (a,b) Cannot be used as it does not retrun any value
D
swap (a,b) Cannot be used as the parameters passed by value
Question 662Single Answer
Which layers of the OSl reference model are host-to host layers?
A
Transport, session ,presentation, application
B
Session ,Presentation, application
C
Datalink,transport, Presentation, application
D
Physical,datalink ,network,transport
Question 663Single Answer
What problem is solved by Dijkstra banker`s algorithm?
A
Mutual exclusion
B
Deadlock recovery
C
Deadlock avoidance
D
Cache coherence
Question 664Single Answer
Which of the following are used to generate a message digest by the network security protocols?
P. SHA-256
Q. AES
R. DES
S. MDS
A
p and s only
B
p and Q only
C
R and s only
D
p and R only
Question 665Single Answer
The number of swappings needed to sort the numbers 8,22,7,9,31,5,13,in ascending order using bubble sort is
A
11
B
12
C
13
D
10
Question 666Single Answer
Alpha and Beta testing are forms of
A
Acceptance testing
B
Integration testing
C
System testing
D
Unit testing
Question 667Single Answer
In the IPv4 addressing format, the numbers of networks allowed under class C addresses is
A
220
B
234
C
214
D
221
Question 668Single Answer
If in a software project the number of user input, user output,enquiries,files and external interfaces are (15.50.24.12.8), respectively, with complexity average weighing factor. The Productivity if effort = 70 Percent-month is
A
110.54
B
408.74
C
304.78
D
220.14
Question 669Single Answer
An Internet service provider (ISP) has the following chunk of CIDR-based IP addresses available with it. 245.248.128.0/20.The ISP wants to give half of this chunk of addresses to Organization A, and a quarter to Organization B .while retaining the remaining with itself. Which of the following is a valid allocation of addresses to A and B?
A
245.248.136.0/21 and 245.248.128.0/22
B
245.248.128.0/21 and 245.248.128.0/22
C
245.248.132.0/22 and 245.248.132.0/21
D
245.248.136.0/24 and 245.248.132.0/21
Question 670Single Answer
Consider the following tree
If the post order traversal gives ab -cd*+ then the label of the nodes 1,2,3….will be
A
+,-,*,a,b,c,d
B
a,-,b,+,c,*,-,d
C
a,b,c,d,-,*,+
D
-,a,b,+,-,*,c,d
Question 671Single Answer
What is the output of the following program?
Main()
{
Int a=10;
If((fork()==0))
a++
print (^^%dn”,a);
}
A
10 and 11
B
10
C
11
D
11 and 11
Question 672Single Answer
The contents of the flag register after execution of the following program by 8085 microprocessor will be
Program
SUB A
MVI B (01) H
DCR B
HLT
A
(54)H
B
(OO)H
C
(01)H
D
(45)H
Question 673Single Answer
Which of the following operator (s) cannot be overloaded?
A
(Member Access or Dot Operator)
B
?: (Ternary or Conditional Operator)
C
:: (Scope Resolution Operator)
D
All of the above
Question 674Single Answer
Which of the following UML 2.0 diagrams Capture behavioral aspects of a system?
A
Use Case Diagram, Object,Diagram,Activity Diagram, and State Machine Diagram
B
Use Case Diagram, Activity Diagram, and State Machine Diagram
C
Object Diagram, Communication Diagram, Timing Diagram, and Interaction diagram
D
Object Diagram, composite structure Diagram, Package Diagram, and Deployment Diagram
Question 675Single Answer
Which of the following is associated with objects?
A
State
B
Behavior
C
Identity
D
All of the above
Question 676Single Answer
The minimum time delay between the initiation of two independent memory operations is called
A
Access time
B
Cycle time
C
Rotational time
D
Latency time
Question 677Single Answer
Which one of these is characteristic of RAID 5?
A
Dedicated parity
B
Double parity
C
Hamming code parity
D
Distributed parity
Question 678Single Answer
SATA is the abbreviation of
A
Serial Advanced Technology Attachment
B
Serial Advanced Technology Architecture
C
Serial Advanced Technology Adapter
D
Serial Advanced Technology Array
Question 679Single Answer
Capability Maturity Model (CMM) is a methodology to
A
Develop and refine an organization `S Software development process
B
Develop the software
C
Test the software
D
All of the above
Question 680Single Answer
Which protocol suite designed by IETF to provide security for a packet at the Internet layer?
A
IPsec
B
NetSec
C
Packetsec
D
SSL
Question 681Single Answer
Which of the following Compression algorithm is used to generate a.png file?
A
LZ 78
B
Deflate
C
LZW
D
Huffman
Question 682Single Answer
Let L, be regular languge,L2 be a deterministic context free language and L3 a recursively enumerable language, but not recursive Which one of the following statement is false?
A
L3 L1 is recursive
B
L1 L2 L3 is recursively enumerable
C
L1 L2 is context free
D
L1 L2 is context free
Question 683Single Answer
Pretty Good privacy (PGP) is used in
A
Browser security
B
FTP security
C
Email security
D
None of the above
Question 684Single Answer
Dirty bit for a page in a page table
A
helps avoid unnecessary writes on a paging device
B
helps maintain LRU information
C
allows only read on a page
D
None of the above
Question 685Single Answer
What is WPA?
A
Wired protected access
B
wi-fi protected access
C
wired process access
D
wi-fi process access
Question 686Single Answer
Let L = {a p | p is a prime }.Then which of the following is true
A
It is not accepted by a Turing Machine.
B
It is regular but not context free
C
It is context free but not regular.
D
It is neither regular nor context free, but accepted by a Turing Machine.
Question 687Single Answer
Which of the following is not an image type used in MPEG?
A
A frame
B
B frame
C
D frame
D
P frame
Question 688Single Answer
Estimation of software development effort for organic software in basic COCOMO is
A
E =2.0 (KLOC)1.05 PM
B
E =3.4 (KLOC)1.06 PM
C
E =2.4 (KLOC)1.05 PM
D
E =2.4 (KLOC)1.07 PM
Question 689Single Answer
Consider an uncompressed stereo audio signal of CD quality which is sampled at 44.1 KHz and quantized using 16 bits. What is required storage space if a compression ratio of 0.5 is achieved for 10 seconds of this audio?
A
172 KB
B
430 KB
C
860 KB
D
1720 KB
Question 690Single Answer
Xpath is used to navigate through elements and attributes in
A
XSL document
B
XML document
C
XHTML document
D
XQuery document
Question 691Single Answer
Which of the following are context free?
A = { an bn am bm | m,n > 0}
B = { an bn am bn | m,n > 0}
C = { an bn | m2n,m,n > 0}
A
A and B only
B
A and C only
C
B and C only
D
C only
Question 692Single Answer
What is compression ratio in a typical mp3 audio files?
A
4 : 1
B
6 : 1
C
8 : 1
D
10 : 1
Question 693Single Answer
Let S be an NP-complete problem and R are other Two problem not Known to be NP.Q is polynomial time reducible to S and S is polynomial time reducible to R, Which of the following statements is true?
A
R is NP –complete
B
R is NP-hard
C
Q is NP-complete
D
Q is NP-hard
Question 694Single Answer
What is the output of this C++ program?
#include
Using namespace std;
Void square(int*x)
{
*x =(*x++(*x);
}
Void square (Int*x,int*y)
{
*x=*x)—(*x);
}
Int main()
{
Int number =30;
Square(&number,&number);
Cout<
Return 0;
}
A
910
B
920
C
870
D
900
Question 695Single Answer
Consider the following program fragment if (a>b) if (b>c) s1;else s2;
S2 will be executed if
A
a<=b
B
b>c
C
b>=c and a<=b
D
a>b and b<=c
Question 696Single Answer
The number of structurally different possible binary tress with 4 nodes is
A
14
B
12
C
336
D
168
Question 697Single Answer
If there are n devices (nodes) in a network, what is the number of cable links required for a fully connected mesh and a star topology respectively
A
n(n-1)/2,n-1
B
n,n-1
C
n-1 ,n
D
n-1,n(n-1)/2
Question 698Single Answer
Which of the following protocol is used for transferring electronic mail messages from one machine to another?
A
TELNEP
B
FTP
C
SNMP
D
SMTP
Question 699Single Answer
If n has 3 values then the statement a[ ++n]=n++;
A
assigns 3 to a[5]
B
assigns 4 to a [5]
C
assigns 4 to a [4]
D
what is assigned is compiler dependent
Question 700Single Answer
Which media access control protocol is used by IEEE 802.11 wireless LAN?
A
CDMA
B
CSMA/CA
C
ALOHA
D
None of these
Question 701Single Answer
The 0 and 1 in the binary numbering system are called Binary Digits or
A
Bytes
B
Kilobytes
C
Decimal bytes
D
Bits
Question 702Single Answer
What language does a browser typically interpret to display information from the World Wide Web ?
A
Machine Code
B
Assembly Language
C
HTML
D
C++
Question 703Single Answer
______ is the process of finding errors in software code.
A
Compiling
B
Testing
C
Running
D
Debugging
Question 704Single Answer
The code for a Web page is written using _________.
A
A fifth generation language
B
WinZip
C
Peripherals
D
Hypertext Markup Language
Question 705Single Answer
A program is a sequence of ___________ written in a programming language.
A
Lines
B
Function
C
Instructions
D
Code words
Question 706Single Answer
Which of the following languages is more suited to a structured program ?
A
PL/1
B
FORTRAN
C
BASIC
D
PASCAL
Question 707Single Answer
A computer program that converts assembly language to machine language to machine language is
A
compiler
B
Interpreter
C
Assembler
D
None of the above
Question 708Single Answer
The symbols used in an assembly language are
A
Codes
B
Mnemonics
C
Assembler
D
All of the above
Question 709Single Answer
Which is a non-standard version of a computing language ?
A
PROLOG
B
APL
C
Army
D
PL/1
Question 710Single Answer
A language which is close to that used with in the computer is
A
High – level language
B
Assembly language
C
Low- level language
D
All of the above
Question 711Single Answer
Program execution time would be minimum if the programs are written in
A
Machine Language
B
Assembly language
C
High level language
D
All of the above
Question 712Single Answer
Which one of the following is not a type of a language processor ?
A
Compiler
B
Interpreter
C
Application software
D
Assembler
Question 713Single Answer
Which one of the following is called low level languages ?
A
Machine language
B
Assembly language
C
both of the above
D
None of the above
Question 714Single Answer
Which is the limitation of high level language ?
A
Lower efficiency
B
Machine dependence
C
Machine level coding
D
None of above
Question 715Single Answer
Programming language which is used for scientific purposes and work is to be done in batches is
A
PASCAL
B
FORTRAN
C
LOGO
D
COMAL
Question 716Single Answer
Programming language which is extension of programming language 'BASIC' is
A
PASCAL
B
COBOL
C
LOGO
D
COMAL
Question 717Single Answer
Program subroutines are
A
called by other programs
B
fixed variable
C
default constants
D
default variables
Question 718Single Answer
Loop statement which is repeated to some given number of times is classified as
A
FOR loop
B
GO loop
C
REPEAT loop
D
GO REPEAT loop
Question 719Single Answer
A program which interprets each line of high level program at time of execution is called
A
instructor
B
interpreter
C
translator
D
executor
Question 720Single Answer
Set of data whose items are organized together is classified as
A
data structure
B
variable structure
C
string structure
D
positive structure
Question 721Single Answer
______ is a container that represents a value in a program .
A
Compiler
B
Variable
C
Data type
D
None of the above
Question 722Single Answer
To distinguish between different data types, a computer uses special ______ .
A
Internal codes
B
External codes
C
compilers
D
None of the above
Question 723Single Answer
_______ is the same thing as a variable with one major difference. Its does not change, while the value of a variable can change throughout a program .
A
fixed-Variable
B
Conditional
C
Constant
D
None of the above
Question 724Single Answer
Array is a special type of variable used in many programming languages, such as ________
A
C
B
C++
C
Java
D
All of the above
Question 725Single Answer
What is a segment of code that executes repeatedly based on a certain condition ?
A
Function
B
Array
C
Loop
D
None of the above
Question 726Single Answer
What is defined as a set of code used to carry out specific tasks ?
A
Function
B
Class
C
Loop
D
None of the above
Question 727Single Answer
What is used for a real world object that is to be used in a program ?
A
Program
B
Template
C
Car Class
D
None of the above
Question 728Single Answer
_______ is object oriented programming language that uses virtual functions, multiple inheritance, exception handling, polymorphism, etc .
A
C++
B
C
C
GUI
D
None of the above
Question 729Single Answer
C++ provides comprehensive coverage of abstract classes, such as ______ .
A
Interfaces
B
Regular error handling, standard strings
C
I/O strings
D
All of the above
Question 730Single Answer
A linked list a linear collection of similar data elements called ______ .
A
Subscript
B
Index
C
Nodes
D
Null
Question 731Single Answer
______ was the first high-level language developed by john Backus at IBM in 1956
A
FORTRAN
B
COBOL
C
BASIC
D
NONE OF THE ABOVE
Question 732Single Answer
This language was developed by Dennis Ritchie of Bell Laboratories in order to implement the operating system UNIX .
A
C
B
C++
C
Java
D
LISP
Question 733Single Answer
C is known as
A
low level programming language
B
High level programming language
C
Machine language
D
None of the above
Question 734Single Answer
Which of the following is language processor ?
A
Interpreter
B
Assembler
C
Compiler
D
All of the above
Question 735Single Answer
________ converts an assembly language program into machine language .
A
Assembler
B
Compiler
C
Interpreter
D
All of the above
Question 736Single Answer
Which of the following language processors converts a high-level language program line by line into a machine language ?
A
Assembler
B
Interpreter
C
Compiler
D
None of the above
Question 737Single Answer
Errors in a computer program are referred to as
A
Bugs
B
Mistakes
C
Item overlooked
D
Crash
Question 738Single Answer
Computer programs are written in a high level programming language; however, the human-readable version of a program is called ________ .
A
cache
B
Instruction set
C
source code
D
word size
Question 739Single Answer
Which of the following is not a programming language ?
A
Pascal
B
Microsoft Office
C
Java
D
C++
Question 740Single Answer
What is correcting errors in a program called ?
A
Compiling
B
Debugging
C
Grinding
D
Interpreting
Question 741Single Answer
Which one of the following is not a computer language ?
A
Java
B
COBOL
C
ASP
D
LOTUS
Question 742Single Answer
Which of the following is not a computer language ?
A
PASCAL
B
UNIX
C
FORTRAN
D
COBOL
Question 743Single Answer
A series of instructions that tells a computer what to do and how to do. It is called a __________
A
program
B
command
C
user response
D
processor
Question 744Single Answer
A set of step-by-setp procedures for accomplishing a task is known as a (n) ________ .
A
algorithm
B
hardware program
C
software bug
D
firmware program
Question 745Single Answer
All of the following are included in typical Computer programming language which are in use currently Except
A
C++
B
Java
C
visual Basic NET
D
Machine language
Question 746Single Answer
Query language comes under:
A
Third generation
B
Fourth generation
C
Fifth generation
D
None of these
Question 747Single Answer
Errors in computer programs are called
A
Follies
B
Mistakes
C
Bugs
D
Spam
Question 748Single Answer
The default file extension of MS-Excel is
A
xlr
B
exe
C
exl
D
xls
Question 749Single Answer
High Level programming language can be converted to machine language using which of the following ?
A
Oracle
B
Compiler
C
Mat lab
D
Assembler
Question 750Single Answer
Which programming language are classified as low level languages ?
A
BASIC, COBOL, FORTRAN
B
Prolog
C
C, C ++
D
Assembly languages
Question 751Single Answer
FORTRAN is
A
File Translation
B
Format Translation
C
Formula Translation
D
Floppy Translation
Question 752Single Answer
Who invented the high level language "C" ?
A
Dennis M. Ritchie
B
Niklaus Writh
C
Seymour Papert
D
Donald Kunth
Question 753Single Answer
_____ is an OOP principle .
A
Structured programming
B
Procedural programming
C
Inheritance
D
Linking
Question 754Single Answer
COBOL is widely used in ________ applications .
A
Commercial
B
Scientific
C
Space
D
Mathematical
Question 755Single Answer
Father of "C" programming language
A
Dennis Ritchie
B
Prof John Keenly
C
Thomas Kurtz
D
Bill Gates
Question 756Single Answer
The instructions that tell a computer how to carry out the processing tasks are referred
A
programs
B
processors
C
input devices
D
memory moduless
Question 757Single Answer
Which one of the following is NOT a computer language ?
A
MS- Excel
B
BASIC
C
COBOL
D
C++
Question 758Single Answer
COBOL is an acronym for _______
A
Common Business Oriented Language
B
Computer Business Oriented Language
C
Common Business Operated Language
D
Common Business Organized Language
Question 759Single Answer
Which of the following is not a binary number ?
A
1
B
101
C
202
D
110
Question 760Single Answer
When creating a computer program, the ______designs the structure of the program .
A
End user
B
System Analyst
C
Programmer
D
All of the above
Question 761Single Answer
Binary numbers need more places for counting because
A
They are always big number
B
Any no of 0's can be added in front of them
C
Binary base is small
D
0's and I's have to be properly spaced apart
Question 762Single Answer
The 2's complement of a binary no. is obtained by adding _________ to its 1's complment .
A
zero
B
1
C
10
D
12
Question 763Single Answer
A systems programming language for microcomputers in the intel family is
A
PL/C
B
PL/CT
C
PL/M
D
PLA
Question 764Single Answer
Which is a machine-oriented high-level language for the GEC 4080 series machines .
A
LOGO
B
SNOBOL
C
Babbage
D
ALGOL
Question 765Single Answer
Data division is the third division of a_______program .
A
COBOL
B
BASIC
C
PASCAL
D
FORTH
Question 766Single Answer
Which language was devised by Dr. Seymour Aubrey Papert ?
A
APL
B
COBOL
C
LOGO
D
FORTRAN
Question 767Single Answer
Which of the following is intended to be used in all applications runs on mainframe computers .
A
LOGO
B
APL
C
PL/1
D
OCCAM
Question 768Single Answer
Which is another name for functional language ?
A
Machine
B
Application language
C
Low-Level language
D
High – level language
Question 769Single Answer
A notation used to express clearly on algorithm is known as
A
Algorithmic language
B
Assembly language
C
Machine language
D
High level language
Question 770Single Answer
Which programming language is based on Algol60.
A
PILOT
B
SNOBOL
C
ADA
D
SIMULA
Question 771Single Answer
Symbolic languages were developed in
A
1962
B
1950
C
1974
D
1980
Question 772Single Answer
The language that is an input for statement translation is called .
A
Assembly language
B
Source language
C
High-level language
D
Object language
Question 773Single Answer
Who is the creator of the PASCAL language ?
A
Niklaus Wirth
B
Dijkstra
C
Donald Knuth
D
Basic Pascal
Question 774Single Answer
Computer instructions written with the use of English words instead of binary machine code is called
A
Mnemonics
B
Symbolic code
C
Gray code
D
OP - code
Question 775Single Answer
The following is true about 2 out of 5 code
A
It is weighted code
B
it is unweighted code
C
it has odd parity
D
All of the above
Question 776Single Answer
Each model of a computer has a unique
A
Assembly language
B
Machine language
C
High level langauge
D
All of the above
Question 777Single Answer
The process of writing computer instructions in a programming language is known as
A
Coding
B
Processing
C
Progamming
D
File
Question 778Single Answer
The computer program language which is widely used in computer science and engineering and also in business is
A
COBOL
B
FORTRAN
C
PASCAL
D
LISP
Question 779Single Answer
Group of instructions that directs a computer is called
A
Storage
B
Memory
C
Logic
D
Program
Question 780Single Answer
A code which uses more bits for each character then what is necessary is known as
A
Hollerith code
B
Gray code
C
Redundant code
D
Mnemonics
Question 781Single Answer
A device which converts human readable data into machine language is
A
Card reader
B
Card punch
C
Punched paper tape
D
Character reader
Question 782Single Answer
The most popular language for interactive use is
A
COBOL
B
PASCAL
C
BASIC
D
FORTRAN
Question 783Single Answer
In which of the following, each data item contains at most 2 points
A
List Structure
B
LISP
C
List sorting
D
List head
Question 784Single Answer
A step-by-step procedure used to solve a problem is called
A
Operating system
B
Algorithm
C
Application program
D
All of the above
Question 785Single Answer
Which of the following is a special purpose language used to describe to a computer's operating system .
A
LOGO
B
APL
C
ICL
D
CORAL
Question 786Single Answer
Which of the following language is the most widely used ?
A
PL/1
B
BASIC
C
FORTRAN
D
PASCAL
Question 787Single Answer
Which language was created by Charles H. Moore at National Radio Astronomy Observatory .
A
BASIC
B
FORTH
C
dBASE
D
COBOL
Question 788Single Answer
Which of the following language is often translated in pseudo code ?
A
Assembly
B
FORTRAN
C
PASCAL
D
BASIC
Question 789Single Answer
Programmed instructions to the computer is known as
A
Data
B
Code
C
Documentation
D
Database
Question 790Single Answer
Programs prepared by an outside supplier & privided to a user in a machine readable form is knwon as
A
Utility program
B
Canned program
C
Application program
D
Application software
Question 791Single Answer
Dennis was Author of Famous Programming Book ________ .
A
C programming and Techniques
B
Thinking in C
C
The C programming Language
D
Learn C step By Step
Question 792Single Answer
C Programing was created at ________ at Dennis Ritchie .
A
Stanford Lab
B
Haward University
C
AT & T Bell Laboratory
D
L&T Laboratory
Question 793Single Answer
C Programming was created in year ______ .
A
1976
B
1972
C
1967
D
1980
Question 794Single Answer
Many features of C were derived from an earlier language called _____ .
A
B
B
PASCAL
C
BASIC
D
FORTRAN
Question 795Single Answer
Which Committe standardize C Programming Language ?
A
ANSI
B
W3C
C
TRAI
D
ISO
Question 796Single Answer
Ritchie and Brian Kernighan jointly carried out the development of C and that version is _________ .
A
K&R C
B
ANSI C
C
C99
D
R&KC
Question 797Single Answer
Who was Creator of B Language, which inspired Dennis Ritchie to create Strong Procedural Language called C ?
A
Ken Thompson
B
Thomas E. Kurtz
C
John W. Backus
D
Brian Kernighan
Question 798Single Answer
Dennis Ritchie Born On _____ ?
A
September 9, 1941
B
September 9, 1958
C
September 9, 1951
D
September 9, 1947
Question 799Single Answer
Who is called as Father of C Programming Language ?
A
Steve Jobs
B
Dennis Ritchie
C
Ken Thompson
D
Bill Gates
Question 800Single Answer
By Nationality, Dennis Ritchie Was _____ ?
A
British
B
Russian
C
Canadian
D
American
Question 801Single Answer
Dennis Ritchie Completed his graduation from _______ University ?
A
MIT University
B
Stanford University
C
Harvard University
D
Cembridge University
Question 802Single Answer
What is full Name of Dennis Ritchie ?
A
Dennis George Ritchie
B
Dennis Stephen Ritchie
C
Dennis Bill Ritchie
D
Dennis MacAlistair Ritchie
Question 803Single Answer
Dennis Ritchie Was Creator of Famous Programming Language
A
BCPL
B
C++ Programming
C
C Programming
D
BASIC
Question 804Single Answer
Following Operating System was Created By Dennis Ritchie
Determine Output:
void main ( )
{
printf ("%p", main );
}
A
Error
B
make an infinite loop
C
Some address will be printed
D
None of these
Question 808Single Answer
Determine Output:
void main ( )
{
char not;
not = 12;
printf("%d", not);
}
A
2
B
Garbage Value
C
0
D
None of these
Question 809Single Answer
Determine Output:
void main ( )
{
int i = i++, j=j++, k = k++;
printf(“%d %d %d", i , j, k);
}
A
1 1 1
B
0 0 0
C
garbage values
D
Error
Question 810Single Answer
Who is father of C Language ?
A
Bjarne Stroustrup
B
James A. Gosling
C
Dennis Ritchie
D
Dr. E.F. Codd
Question 811Single Answer
C Language developed at ________ ?
A
AT & T's Bell Laboratories of USA in 1972
B
AT & T's Bell Laboratories of USA in 1970
C
Sun Microsystems in 1973
D
Cambridge University in 1972
Question 812Single Answer
For 16-bit compiler allowable range for integer constants is ______?
A
-3.4e38 to 3.4e38
B
-32767 to 32768
C
-32668 to 32667
D
-32768 to 32767
Question 813Single Answer
C programs are converted into machine language with the help of
A
An Editor
B
A compiler
C
An operating system
D
None of these
Question 814Single Answer
C was primarily developed as
A
System programming language
B
General purpose language
C
Data processing language
D
None of the above
Question 815Single Answer
Standard ANSIC recognizes ______ number of keywords ?
A
30
B
32
C
24
D
36
Question 816Single Answer
Which one of the following is not a reserved keyword for C ?
A
auto
B
case
C
main
D
default
Question 817Single Answer
A C variable cannot start with
A
A number
B
A special symbol other thatn underscore
C
Both of the above
D
An alphabet
Question 818Single Answer
Which one of the following is not a valid identifier ?
A
_compscibits
B
1compscibits
C
comp_scibits
D
compscibits 1
Question 819Single Answer
If integer needs two bytes of storage, then maximum value of an unsigned integer is
A
2^16 - 1
B
2^15 – 1
C
2^ 16
D
2^15
Question 820Single Answer
What is the correct value to return to the operating system upon the successful completion of a program ?
A
1
B
-1
C
zero
D
Program do not return a value
Question 821Single Answer
Which is the only function all C programs must contain ?
A
start()
B
system ( )
C
main ( )
D
printf ( )
Question 822Single Answer
Which of the following is not a correct variable type ?
A
float
B
real
C
int
D
double
Question 823Single Answer
What number would be shown on the screen after the following statements of C are executed ?
char ch;
int i;
ch = 'G';
i = ch- 'A';
printf("%d",i);
A
5
B
6
C
7
D
8
Question 824Single Answer
Which of following is not a valid name for a C variable ?
A
Computerscibits
B
computer_scibits
C
computer scibits
D
Both A and B
Question 825Single Answer
Find the output of the following program.
void main ( ) {int i = 01289; printf("%d", i); }
A
0289
B
1289
C
0713
D
Syntax error
Question 826Single Answer
If ASCII Value of 'x' is 120, then what is the value of
the H, if
H = ( 'x' – 'w') / 3;
A
1
B
2
C
3
D
zero
Question 827Single Answer
Find the output of the following program.
void ( )
{
int i = 065, j = 65;
printf("%d", i, j)";
}
A
5365
B
6565
C
06565
D
05365
Question 828Single Answer
What is the difference between a declaration and a definition of a variable?
A
Both can occur multiple times, but a declaration must occur first
B
A definition occurs once, but a declaration may occur many times
C
Both can occur multiple times, but a definition must occur first
D
A declaration occurs once, but a definition may occur many times
Question 829Single Answer
"My salary was increased by 15%" Select the statement, which will EXACTLY reproduce the line of text above.
A
printf("My salary was increased by 15/%!");
B
printf("My salary was increased by 15%!");
C
printf ("My salary was increased by 15'%'!");
D
printf("My salary was increased by 15%%!");
Question 830Single Answer
How many times below for loop will be executed ?
#include
int main ( )
{
int i = 0;
for(;;)
printf("%d",i);
return 0;
}
A
0 times
B
Infinite times
C
1 times
D
10 times
Question 831Single Answer
Find output of the following program ?
#include
int main ( )
{
char str [ ] = "Smaller";
int a = 100;
printf(a > 10? "Greater" : "%s", str);
return 0;
}
A
Greater
B
100
C
Smaller
D
Compile Error
Question 832Single Answer
Assuming a short is two bytes long, what will be printed by the below
code ?
short testarray[4][3] = { {1}, {2,3}, {4, 5, 6} } ;
printf("%d", sizeof(testarray));
A
6
B
7
C
24
D
It will not compile because not enough initializers are given
Question 833Single Answer
Guess the output of the following program ?
#include
int main ( )
{
int a = 100, b = 200, c = 300;
if(!a> = 500)
b = 300;
c = 400;
printf("%d,%d,%d", a, b, c);
return 0;
}
A
100, 300, 300
B
100,200,400
C
100,200,300
D
100,300,400
Question 834Single Answer
Guess the output of the following program;
#include
int main ( )
{ int x = 10;
float y = 10.0;
if(x = y)
printf("x and y are equal");
else
printf("x and y are not equal");
return 0;
}
A
x and y are equal
B
Compile Error
C
Run Time Error
D
x and y are not equal
Question 835Single Answer
Guess the output of the program ?
#Include
int main( )
{
int a =0, b =1, c=2;
*((a+1 ==1) ? &b :&a) = a? b:c;
printf("%d, %d, %d/n", a,b,c);
return 0;
}
A
1, 1, 2
B
2, 2, 2
C
0, 2, 2
D
0, 1, 2
Question 836Single Answer
What will be printed if we execute following program ?
#include
int main ( )
{
float a = 0.3;
if(0.3 >a)
printf("True/n");
else
printf("False/n");
return 0;
}
A
False
B
True
C
True False
D
None of these
Question 837Single Answer
Predict the output of the program ?
#include
int main ( )
{
if(printf("ABC"))
printf("True");
else
printf("False");
return 0;
}
A
ABC
B
ABCFalse
C
True
D
ABCTrue
Question 838Single Answer
Guess the output of the program ?
#include
int main ( )
{
int i = 1, j = 2;
if(i = 1) && if (j = 2)
printf ("India is my country");
return 0;
}
A
No output and No Error
B
Error : Misplaced IF
C
Error : Expression Syntax Error
D
Error : Undeclared identifier if
Question 839Single Answer
How many times loop will get executed ?
#Include
int main ( )
{
int i = 0;
while(i < = 255)
{
printf("%d",i);
i++;
}
return 0;
}
A
1 Time
B
255 Times
C
Infinite Times
D
256 Times
Question 840Single Answer
Point out error in the following code-
#include
int main ( )
{
int x = 50, y = 100;
if( x = = y)
printf("x is equal to yn"); else if (x>y)
printf("x is greater than yn"); else if (x < y)
printf ("x is less than yn")1
return 0;
}
A
Error : R – Value Required
B
Error : Expression Syntax
C
Error : L – Value Required
D
Error : Statement missing Semicolon
Question 841Single Answer
Nesting of if-else statements is allowed in C programming .
A
Yes
B
No
C
Depends on Compiler
D
None of the above
Question 842Single Answer
A char variable storing either an ASCII character or a Unicode character is allowed inside switch case.
A
True
B
False
C
Depends on Compiler
D
None of the above
Question 843Single Answer
We cannot use String in the Switch case as label !
A
False
B
True
C
Depends on compiler
D
None of the above
Question 844Single Answer
Which of the following cannot be checked in a switch case statement ?
A
Character
B
Integer
C
Enum
D
Float
Question 845Single Answer
Continue statement is allowed inside the switch case statement ?
A
No
B
Yes
C
Depends on the Compiler
D
None of the above
Question 846Single Answer
Which of the statement we need to write, in order to check any condition .
A
If
B
Break
C
Continue
D
exit
Question 847Single Answer
Which of the following is not an example of looping statement ?
A
for
B
do - while
C
while
D
switch
Question 848Single Answer
What will be the valid value of X by Which we can print
"DEF"
#Include
int main ( )
{
int x = ______; if (x)
printf("ABC");
else
printf("DEF");
return 0;
}
A
zero
B
-9
C
'0'
D
'A'
Question 849Single Answer
For loop is _____ .
A
Function Controlled Loop
B
Entry Controlled Loop
C
Exit Controlled Loop
D
None of these
Question 850Single Answer
What will be the outpur of the program?
#include int main ( )
{
int y = 128;
const int x=y;
printf("%dn",x);
return 0;
}
A
128
B
Garbage value
C
Error
D
zero
Question 851Single Answer
What will be the output of the program ?
#include
#include union employee
{
Char name [15];
int age;
float salary;
};
const union employee e1; int main ( )
{
strcpy(e1.name,"K");
printf("%s%d%f',e1.name,e1.age,e1salary);
return0;
}
A
Error: cannot convert from 'const int *' to 'int *const'
B
Error:LValue required in Strcpy
C
Error :RValue required
D
No error
Question 852Single Answer
What will be the output of the program?
#include
int fun(int **ptr); int main ( )
{
int i = 10;
const int * ptr = &i;
fun(&ptr);
return 0;
}
int fun(int**ptr)
{
int j = 223;
int * temp = &j;
printf("Before changing ptr = %5xn",*ptr);
const*ptr = temp;
printf("After changing ptr = %5xn",*ptr);
return 0;
}
A
Address of i Address of j
B
10223
C
Error:cannot convert parameter 1 from 'const int **to 'int**'
D
Garbage value
Question 853Single Answer
What will be the output of the program ?
#include
int main ( )
{
const int x = 5;
const int *ptrx;
ptrx = &x;
*ptrx = 10;
printf("%dn", x);
return 0;
}
A
5
B
10
C
Error
D
Garbage Value
Question 854Single Answer
What will be the output of the program in TurboC ?
#include
int fun (int **ptr);
int main ( )
{
int i = 10, j = 20;
const int *ptr = &i;
printf("i = %5X",ptr):
Printf("ptr = %d", *ptr);
ptr = &j;
printf("j = %5X",ptr);
printf("ptr=%d",*ptr);
return 0;
}
A
i = FFE2ptr=12j=FFE4ptr=24
B
i = FFE4ptr=10j=FFE2ptr=20
C
i = FFE0ptr=20j=FFE1ptr=30
D
Garbage value
Question 855Single Answer
What are the types of linkages ?
A
Internal and External
B
External, Internal and None
C
External and None
D
Internal
Question 856Single Answer
Which of the following special symbol allowed in a variable name ?
A
* (asterisk)
B
| (pipeline)
C
– (hyphen)
D
_ (underscore)
Question 857Single Answer
What will be the output of the program ?
#include int main( )
{
const char *s = " " ;
char str [ ] = "Hello";
s = str;
while (*s)
print("%c",*S++); return 0;
}
A
Error
B
H
C
Hello
D
Hel
Question 858Single Answer
What will be the output of the program?
#include
int get ( ); int main ( )
{
const int x= get ( );
printf("%d",x);
return 0;
}
int get ( )
{
return 20;
}
A
Garbage value
B
Error
C
20
D
zero
Question 859Single Answer
If the class name is X, what is the type of its "This" pointer (in a nonstatic, non – const member function) ?
A
const X* const
B
X * const
C
X*
D
X &
Question 860Single Answer
Which classes allow primitive types to be accessed as objects ?
A
Storage
B
Virtual
C
Friend
D
Wrapper
Question 861Single Answer
When is std::bad_alloc exception thrown ?
A
When new operator cannot allocate memory
B
When alloc function fails
C
When type requested for new operation is considered bad, this exception is thrown
D
When delete operator cannot delete teh allocated (corrupted) object
Question 862Single Answer
Which one of the following is not a fundamental data type in C++
A
float
B
string
C
int
D
wchar_t
Question 863Single Answer
Which of the following is a valid destructor of the class name "Country"
A
int ~ Country ( )
B
void Country ( )
C
int ~ Country (Country obj)
D
void ~ Country ( )
Question 864Single Answer
Which of the following correctly describes C++ language ?
A
Statically typed language
B
Dynamically typed language
C
Both Statically and dynamically typed language
D
Type-less language
Question 865Single Answer
Which of the following keyword supports dynamic method resolution ?
A
abstract
B
Virtual
C
Dynamic
D
Typeid
Question 866Single Answer
Which of the following is the most preferred way of throwing and handling exceptions ?
A
Throw by value and and catch by reference.
B
Throw by reference and catch by reference.
C
Throw by value and catch by value
D
Throw the pointer value and provide catch for teh pointer type.
Question 867Single Answer
Which of the following is not true about preprocessor directives ?
A
They begin with a hash symbol
B
They are processed by a preprocessor
C
They form an integral part of the code
D
They have to end with a semi colon
Question 868Single Answer
What's wrong? while (i < 10) && (i >24) )
A
the logical operator && cannot be used in a test condition
B
the while loop is an exit-condition loop
C
the test condition is always false
D
the test condition is always true
Question 869Single Answer
A continue statment causes execution to skip to
A
the return 0; statement
B
the first statement after the loop
C
the statement following the continue statement
D
the next iteration of the loop
Question 870Single Answer
What's wrong ? (x = 4&&y = 5)? (a = 5); (b = 6);
A
the question mark should be an equal sign
B
the first semicolon should be a colon
C
there are too many variables in the statement
D
the conditional operator is only used with apstrings
Question 871Single Answer
What's wrong ? for (int k = 2k <=12, k++)
A
the increment should always be ++k
B
the variable must always be the letter i when using a for loop
C
There should be a semicolon at the end of the statement
D
the commas should be semicolons
Question 872Single Answer
Which of the following is not recommended in a header file ?
A
Type definitions (typedefs)
B
Class definitions
C
Function definitions
D
Template definitions
Question 873Single Answer
Which of the STL containers store the elements contiguously (in adjecent memory locations) ?
A
std::vector
B
std::list
C
std::map
D
std::set
Question 874Single Answer
Which of the following is not a standard exception built in C++.
A
std::bad_creat
B
std::bad_alloc
C
std::bad_cast
D
std::bad_typeid
Question 875Single Answer
What does STL stand for ?
A
Simple Template Library
B
Standard Template Library
C
Static Type Library
D
Single Type-based Library
Question 876Single Answer
What is the difference between overloaded functions and overridden functions ?
A
Overloading is a dynamic or run-time and Overriding is static or compile-time binding
B
Redefining a function in a friend class is called function overriding while redefininig a function in a derived class is called a overloaded function.
C
Overloading is a static or compile time binding and Overriding is dynamic or run-time binding
D
Redefining a function in a friend class is called function overloading while Redefining a function in a derived class is called as overridden function.
Question 877Single Answer
Which one of the following is not a valid reserved key word in C++
A
Explicit
B
Public
C
Implicit
D
Private
Question 878Single Answer
Each pass through a loop is called a/an
A
enumeration
B
iteration
C
culmination
D
pass through
Question 879Single Answer
Which of the following is true about const member functions ?
A
const members can be invoked on both const as well as nonconst objects
B
const members can be invoked only on const objects and not on nonconst objects
C
nonconst members can be invoked on const objects as well as nonconst objects
D
none of the above
Question 880Single Answer
Which of the following relationship is known as inheritanceralationship ?
A
'has-a' relationship
B
'is-a' relationship
C
association relationship
D
none of the above
Question 881Single Answer
If class A is friend of class B and if calss B is friend of class C, which of the following is true ?
A
Class C is friend of class A
B
Class A is friend of class C
C
Class A and Class C do not have any friend relationship
D
None of the above
Question 882Single Answer
*ptr++is equivalent to :
A
ptr++
B
*ptr
C
++*ptr
D
None of the above
Question 883Single Answer
A direct access file is :
A
A file is which records are arranged in a way they are inserted in a file
B
A file in which records are arranged in a particular order
C
Files which are stored on a direct access storage medium
D
None of the above
Question 884Single Answer
Which of the following is not a component of file system ?
A
Access method
B
Auxiliary storage management
C
Free integrity mechanism
D
None of these
Question 885Single Answer
Seek time is
A
time taken to retrieve a dta
B
Time taken by read/write head mechanism to position itself over appropriate cylinder
C
Time taken by appropriate sector to come under read/write
D
None of the above
Question 886Single Answer
'Prime area' in context of file system is defined as
A
It is memory area created by operating system
B
It is an area into which data records are written
C
It is the main area of a web page
D
None of the above
Question 887Single Answer
In multi-list organization
A
Records that have equivalent value for a given secondary index item are linked together to form a list
B
Records are loaded in ordered sequence defined by collating sequence by content of the key
C
Records are directly accessed by record key field
D
None of the above
Question 888Single Answer
Which of the following is/are advantages of cellular partitioned structure :
A
Simultaneous read operations can be overlapped
B
Search time is reduced
C
Both a & b
D
None of the above
Question 889Single Answer
The conditional compilation
A
It is taken care of by the compiler
B
it is setting the compiler option conditionally
C
It is compiling a program based on a condition
D
none of above
Question 890Single Answer
Originally 'C' was developed as :
A
System programming language
B
General purpose language
C
Data processing language
D
None of above
Question 891Single Answer
An inverted file
A
Locates information about data in small files that are maintained apart from actual data record
B
A file which stores opposite records
C
A file which stores information about records of a system
D
none of above
Question 892Single Answer
Which of the following is not a file operation :
A
Repositioning
B
Truncating
C
Appending
D
None of above
Question 893Single Answer
Latency time is :
A
Time taken by read/write head mechanism to position itself over appropriate cylinder
B
Time taken to transfer a data from memory
C
Time taken by appropriate sector to come under read/write head
D
None of above
Question 894Single Answer
The two types of file structure existing is VSAM file are
How many copies of a class static member are shared between objects of the class ?
A
A copy of the static member is shared by all objects of a class
B
A copy is created only when at least one object is created from that class
C
A copy of the static member is created for each instntiation of the class
D
No memory is allocated for static members of a class
Question 896Single Answer
Which looping process checks the test condition at the end of the loop ?
A
for
B
while
C
do-while
D
no looping process checks the test condition at the end
Question 897Single Answer
The default access level assigned to members of a class is________
A
Private
B
Public
C
Protected
D
Needs to be assigned
Question 898Single Answer
Which of the following languages is a subset of C++ language ?
A
C language
B
Java Language
C
C# language
D
language
Question 899Single Answer
Which of the following correctly describes the meaning of namespace' feature in C++ ?.
A
Namespaces refer to the memory space allocated for names used in a program
B
Namespaces refer to space between the names in a program
C
Namespaces refer to packing structure of clases in a program
D
Namespsaces provide facilities for a organizing the names in a program to avoid name clashes
Question 900Single Answer
In a spreadsheet, a_________is a number you will use in a calculation .
A
label
B
cell
C
field
D
value
E
None of these
Question 901Single Answer
Which of the following langauge is not supported by C++ ?
A
Exception Handling
B
Reflection
C
Operator Overloading
D
Namespaces
Question 902Single Answer
Class derived: public base1, public base2 { } is an example of
A
Polymorphic inheritance
B
Multilevel inheritance
C
Hierarchical inheritance
D
Multiple inheritance
Question 903Single Answer
How do we declare an 'interface' class ?
A
By making all the methods pure virtual in a class
B
By making all the methods abstract using the key word 'abstract' in a class
C
By declaring the class as interface with the keyword 'interface'
D
It is not possible to create interface clas in C++
Question 904Single Answer
How do we declare an abstract class ?
A
By providing at least one pure virtual method (function signature followed by == 0;)in a class
B
By declaring at elast one method abstract using the keyword 'abstract ' in a class
C
By declaring the class abstract with the keyword 'abstract'
D
It is not possible to create abstract classes in C++
Question 905Single Answer
Which of the following is not an advantage of secondary memory ?
A
It is cost-effective
B
It has large storage capacity
C
It has highest speed
D
It is easily portable
Question 906Single Answer
What happens when a pointer is deleted twice ?
A
It can abort the program
B
It can cause a failure
C
It can cause an error
D
It can cause a trap
Question 907Single Answer
Which of the following language feature is not an access specififer in C++ ?
A
public
B
private
C
C protected
D
internal
Question 908Single Answer
Expression C=i++ causes
A
Value of i assigned to C and then i incremented by 1
B
i to be incremented by 1 and then value of i assigned to C
C
value of i assigned to C
D
i to be incremented by 1
Question 909Single Answer
The statement i ++; is equivalent to
A
i = i + i;
B
i = i+1;
C
i = i – 1;
D
i--;
Question 910Single Answer
In C language, a hexadecimal number is represented by writing
A
x
B
xo
C
ox
D
h
Question 911Single Answer
Which of the followign library function below by default aborts the program ?
A
Terminate ( )
B
end ( )
C
Abort ( )
D
exit ( )
Question 912Single Answer
The smallest item of useful information a computer can handle
A
Bit
B
Byte
C
Bite
D
Bait
Question 913Single Answer
Value of ix+j, if i,j are integer type and ix long type would be
A
integer
B
float
C
long integer
D
double percision
Question 914Single Answer
Which of the following below can perform conversions between pointers to related classes ?
A
cast_static
B
dynamic_cast
C
static_cast
D
cast_dynamic
Question 915Single Answer
How do we define a constructor ?
A
(a)x~0 { }
B
B. X0 { }~
C
C. X0~ { }
D
D. ~X0 { }
Question 916Single Answer
V tables
A
creates a static table per class
B
creates a static table per object
C
creates a dynamic table per class
D
creates a dynamic table per object
Question 917Single Answer
When class B is inherited from class A, what is the order in which the constructeres of those classes are called
A
Class A first Class B next
B
Class B first Class A next
C
Class B's only as it is the child class
D
Class A's only as it is the parent class
Question 918Single Answer
Which of the following is the most general exception handler that catches exception of any type ?
A
catch(std::exception)
B
catch(std::any_exception)
C
Catch(.....)
D
catch( )
Question 919Single Answer
Which is a not valid version of MS Excel ?
A
MS Excel 2003
B
MS Excel 2007
C
MS Excel 2010
D
MS Excel 1020
E
None of these
Question 920Single Answer
In a group of nested loops, which loop is executed the most number of times ?
A
the outermost loop
B
the innermost loop
C
all loops are executed the same number of times
D
cannot be determined without knowing the size of the loops
Question 921Single Answer
What defines a general set of operations what will be applied to various types of data ?
A
Template class
B
Function template
C
Class template
D
Both a and c above
Question 922Single Answer
Under which of the following circumstances, synchronization take place ?
A
When the file is closed
B
When the buffer is empty
C
Explicitly, with manipulators
D
both a and c
Question 923Single Answer
What is the difference between struct and class in terms of Access Modifier ?
A
By default all the struct members are private while by default class members are public.
B
By default all the struct members are protected while by default class members are private.
C
By default all the struct members are public while by default class members are private
D
By default all the struct members are public while by default class members are protected
Question 924Single Answer
Inline functions are invoked at the time of
A
Run time
B
Compile time
C
Depends on how it is invoked
D
Both b and c above
Question 925Single Answer
What is shallow copy ?
A
A shallow copy creates a copy of the dynamically allocated objects too.
B
A shallow copy just copies the values of the data as they are.
C
A shallow copy creates a copy of the statically allocated objects too
D
Both b and c above
Question 926Single Answer
What is deep copy ?
A
A deep copy creates a copy of the dynamically allocated objects too.
B
A deep copy just copies the values of the data as they are.
C
A deep copy, creates a copy of the statically allocated objects too.
D
Both b and c above
Question 927Single Answer
Which of the following below is/are a valid iterator type ?
A
Input Iterator
B
Backward iterator
C
Forward Iterator
D
Both a and c above
Question 928Single Answer
Which of the following functions below can be used AI-locate space for array in memory" ?
A
calloc ( )
B
malloc ( )
C
Realloc ( )
D
both a and c above
Question 929Single Answer
Statement scan ("%d",80);
A
Assign an integer to variable i
B
Give an error message
C
Paint the value of i
D
Assign an float to variable i
Question 930Single Answer
STL is based on which of the following programming paradigms ?
A
Structured Programming
B
Object Oriented Programming (OOP)
C
Functional Programming
D
Aspect Oriented Programming (AOP)
Question 931Single Answer
In Excel, the contents of the active cell are displayed in the
A
footer bar
B
tool bar
C
task bar
D
menu bar
E
formula bar
Question 932Single Answer
Which of the following members do get inherited but become private members in child class
A
Public
B
Private
C
Protected
D
All the above
Question 933Single Answer
In a C language '3' reprsents
A
A digit
B
An integer
C
A character
D
A word
Question 934Single Answer
If there is more than one statement in the block of a for loop, which of the following must be placed at the beginning and the ending of the loop block ?
A
parentheses ( )
B
braces { }
C
brackets [ ]
D
arrows < >
Question 935Single Answer
Which looping process is best used when the number of iterations is known ?
A
for
B
while
C
do- while
D
all looping process require that the iterations be known
Question 936Single Answer
Which of the following is the most common way of implementing C++ ?
A
C++ programs are directly compiled into native code by a compiler
B
C++ programs are first compiled to intermediate code by a compiler and then executed by a virtual machine.
C
C++ programs are interpreted by an interpreter
D
A C++ editor directly compiles and executes the program
Question 937Single Answer
Which header file should we include for using std::auto_ptr ?
Question 938Single Answer
Which of the following operators can be implemented as a nonmember operator ?
A
#NAME?
B
( ) (function call operator)
C
[. (array access operator)
D
+ (addition operator)
Question 939Single Answer
What is the implicit pointer that is passed as the first argument for nonstatic member functions ?
A
'self' pointer
B
std::auto_ptr pointer
C
'Myself' Pointer
D
'this' pointer
Question 940Single Answer
Which of the following operators can be overload ?
A
(dot or member access operator)
B
&(address-of operator)
C
sizeof operator
D
?:(conditional operator)
Question 941Single Answer
Which of the following operator cannot be overloaded ?
A
#NAME?
B
== (equality operator)
C
->(row operator)
D
:: (cope resolution operator)
Question 942Single Answer
Which of the following operators below allow to define the member functions of a class outside the class ?
A
::
B
?
C
:?
D
%
Question 943Single Answer
Which of the following is/are wireless technologies ?
A
Bluetooth
B
Radio wave
C
Microwave
D
All of these
Question 944Single Answer
Which of the following is not a standard exception built in C++
A
std::bad_creat
B
std::bad_alloc
C
std::bad_cast
D
std::bad_typeid
Question 945Single Answer
If a member needs to have unique value for all the objects of that same class, declare the member as
A
Global variable outside class
B
Local variable inside constructor
C
Static variable inside class
D
Dynamic variable inside class
Question 946Single Answer
Under which of the following circumstances, synchronization takes place ?
A
When the file is closed
B
When the buffer is empty
C
Explicitly, with manipulators
D
Both a and c
Question 947Single Answer
Which of the following functions below can be used AI locate space for array in memory ?
A
calloc ( )
B
malloc ( )
C
Realloc ( )
D
Both a and b
Question 948Single Answer
Which of the following is not a valid conditional inclusions in preprocessor directives
A
#ifdef
B
#ifundef
C
#endif
D
#elif
Question 949Single Answer
Value of a in a = (b = 5, b + 5); is
A
Junk value
B
Syntax error
C
5
D
10
Question 950Single Answer
Minimum number of temporary variable needed to swap the contents of 2 variables is :
A
1
B
2
C
3
D
zero
Question 951Single Answer
The output of this program is int main ( ) {cout <<"Hello World!" return 0;}
A
Hello world
B
Syntax error
C
zero
D
Hello world
Question 952Single Answer
The output of
{
int a = 5;
int b = 10;
cout << (a>b?a:b);
}
A
5
B
10
C
Syntax error
D
None of above
Question 953Single Answer
A
Syntax error
B
10 20
C
20 10
D
20 20
Question 954Single Answer
Which of the following is the correct syntax to print the message in C++ language ?
A
cout <<"Hello world!";
B
Cout <
C
Out<<"Hello world!;
D
None of the above
Question 955Single Answer
Which of the following is the correct syntax to read the single character to console in the C++ language ?
A
Read ch ( )
B
Getline vh ( )
C
Get (ch)
D
Scanf(ch)
Question 956Single Answer
Which of the following statement is correct about the formal parameters in C++ ?
A
Parameters with which functions are called
B
parameters which are used in the definition of the function
C
Variables other than passed parameters in a function
D
Variable that are never used in the function
Question 957Single Answer
The C++ language is _____ object-oriented language.
A
Pure Object oriented
B
None object oriented
C
Semi Object-oriented or Partial Object- oriented
D
None of the above
Question 958Single Answer
Which of the following features in required to be supported by the programming language to become a pure object oriented programming language ?
A
Encapsulation
B
Inheriteance
C
Polymorphism
D
All of the above
Question 959Single Answer
Which of the following comment syntax is correct to create a single-line comment in the C++ program ?
A
//Comment
B
/Coment/
C
Comment//
D
None of the above
Question 960Single Answer
C++ is a _____type of language
A
High-level language
B
Low-level language
C
Middle-level language
D
None of the above
Question 961Single Answer
For inserting a new line in C++ program, which one of the following statement can be used ?
A
n
B
d
C
a
D
None of the above
Question 962Single Answer
Internet is
A
a local computer network
B
a worldwise network of computer
C
an interconnected network of computers
D
a world wide interconnected network of computers Which use a common protocol to communicate with one another
E
none of these
Question 963Single Answer
Internet requires
A
an international agreement to connect computers
B
a local area network
C
a common agreed set of rules to commnicate between computers
D
a World Wide Web
Question 964Single Answer
Each computer connected to the internet must
A
be an IBM PC
B
have a unique IP address
C
be internet compatible
D
have a modem connection
Question 965Single Answer
Internet uses
A
Packet switching
B
Circuit switching
C
Telephone switching
D
Telex switching
Question 966Single Answer
The internet also known simply as ______.
A
NOT
B
NAT
C
NET
D
NFT
Question 967Single Answer
What was the first network that planted the seeds of internet ?
A
RAPANET
B
PARANET
C
ARPANET
D
APARANET
Question 968Single Answer
In the following class definition, which is the first line (if any) that causes a compilation error: Select the one correct answer:
public class test{
public static void main (String args [ ]) {
char c; int i ;
c = 'A'; //1
i = c; //2
c = i + 1; //3
C++; //4
}
}
A
The line lebeled 2.
B
The line labeled 3.
C
The line labeled 4.
D
All the lines are correct and the program compiles
Question 969Single Answer
What gets printed on the standard output when the class below is compiled and executed? Select the one correct answer:
public class Short Ckt {
public static void main (String args [ ]) {
int i = 0;
boolean t = true;
boolean f = false, D;
b = (t&&((i++)--0));
b = (f&&( ( i + = 2) > 0));
System.out.printIn();
}
}
A
zero
B
1
C
2
D
3
Question 970Single Answer
What is the other name of worksheet ?
A
Slidesheet
B
Worksheet
C
Spreadsheet
D
Decreasesheet
E
None of these
Question 971Single Answer
ARPANET stands for ______.
A
Advanced Research Projects Agency Network
B
Advanced Research Protects Agency Newark
C
Advanced Reharse Projects Agency Network
D
Advanced Research Projects Agency Network
Question 972Single Answer
The coding language used to create documents for use on the World Wide Web is_________.
A
HTML
B
HSMT
C
HLTM
D
All of these
Question 973Single Answer
HTML stands for
A
HyperTextMarkup Language
B
HyperTextMarking language
C
HyperTextMixLanguage
D
HyperTextMeaningLanguage
Question 974Single Answer
What gets displayed on the screen when the following program is compiled and run?
Select the one correct answer:
public class test {
public static void main (String args [ ]) {
boolean x = true;
int a;
if (x) a = x ? 1:2;
else a = x ? 3:4;
System.out.printIn(a);
}
}
A
1
B
2
C
3
D
4
Question 975Single Answer
______ is the set of rules for exchanging files (text, graphic images, sound, video, and other multimedia files) on the World Wide Web
What gets displayed on the screen when the following program is compiled and run ?
Select the one correct answer :
public class test {
public static void main(Strings args [ ]) {
int x, y;
x = 5 >> 2;
y = x >>>2;
System.out.printIn (y);
}
}
A
5
B
2
C
80
D
zero
Question 978Single Answer
_______ is the basic communication language or protocol of the Internet
A
TCTP/TTP
B
TCDP/IEP
C
TCP/IP
D
TCMP/IKP
Question 979Single Answer
Which of the following are correct. Select all correct answers.
A
Java provides two operators to do left shift- <
B
>> is the zero fill right shift operator.
C
>>> is the signed right shift operator.
D
For positive numbers, results of operators >> and >>> are same
Question 980Single Answer
TCP stands for
A
Transform Control Protocol
B
Transmission Control Protocol
C
Transistor Control Protocol
D
Transmission Communicational protocol
Question 981Single Answer
What happens when the following class is compiled and run ? Select one correct answer.
public class test{
public static void main (String args [ ]) {
int x = 0, y = 1, z;
if (x)
z = 0 ;
else
z = 1;
if(y)
z = 2;
else
z = 3;
System.out. printIn(z);
}
}
A
The program prints 1
B
The program prints 2
C
The program prints 3
D
The program does not compile
Question 982Single Answer
What is the value of the expression (1/4 + 3/ 2 + 0.1) ?
A
1
B
1.85
C
1.1
D
None of the above
Question 983Single Answer
____ to send and receive electronic mail
A
Simple Mail Transfer Protocol
B
Simple Main Transfer Protocol
C
Simplex mail Transistor Protocol
D
Simple Mail Transfermation Protocol
Question 984Single Answer
______ to transmit information on the World Wide Web
A
HTTTP
B
HTPP
C
HTTP
D
HPPT
Question 985Single Answer
A variable x of type int has value 3. What will be the value of y after the execution of the statement:
Int y = x <<32 ?
A
o
B
3
C
3 * 232
D
None of these
Question 986Single Answer
Which protocol helps to transfer files between computers ?
A
FTP
B
HTTP
C
FTTP
D
HTP
Question 987Single Answer
Which of the following is related with 192.9.200.155 ?
A
Hardware address
B
Monitor address
C
IP address
D
All of these
Question 988Single Answer
A variable x of type long has value 3. What will be the value of y after the execution of the statement : long y = x <<65 ?
A
zero
B
6
C
3 * 265
D
3
Question 989Single Answer
What gets displayed on the screen when the following program is compiled and run ? Select the One correct answer.
Protected class example {
public static void main(String args [ ]) {
string test – "abc".
test = test+test;
System.out.printIn(test);
}
}
A
The class does not compile because the top level class cannot be protected.
B
The prgram prints "abc"
C
The program prints "abcabc"
D
The program does not compile because statement "test=test+test" is illegal.
Question 990Single Answer
Given:
class Top!
public Top (Strings){System.out.print("B");}
}
public class Bottom2extends Top {
public class Bottom 2 {String s) { System.out.print("D");}
public static void main (String [ ] args) {
new Bottom2("C")
System.out.printIn(" ");
} }
What is the result ?
A
BD
B
DB
C
BDC
D
Compilation fails
Question 991Single Answer
Given:
Class Uber {
static int y = 2;
Uber(int x) {this ( ); y = y + 2;}
Uber ( ) {y ++;}
}
class Minor extends Uber {
Minor ( ) {super(y); y = y + 3;}
public static void main(String [ ] args) {
new Minor ( );
System.out.printIn(y);
} }
What is the result ?
A
6
B
7
C
8
D
9
Question 992Single Answer
Given the following,
class X { void dol( ) { } }
class y extends x {void do2( ) { } }
class Chrome {
public static void main (String [ ] args){
x xl = new X ();
X x 2 = new Y ( );
y y1 = new Y ( );
//insert code here
}
{
Which of following code inserted at blank line, will compile ?
A
x2.do20);
B
(Y)x2.do20);
C
((Y)x2).do20;
D
None of the above statements will compile
Question 993Single Answer
What will be the result of attempting to compile and run the following program ?
public class Polymorphism{
public static void main(String [ ] args) {
A ref1=new C ( );
B ref2 = (B) ref1;
System.out.printIn(ref2.f ( ) );
}
}
class A {int f ( ) {return0; } }
Class B extends A {int f ( ) {return1;}}
Class C extends B {int f ( ) {return 2;} }
Select the once correct answer :
A
The program will fail to compile.
B
The program will compile without error, but will throw a ClassCastException when run.
C
The program will compile without error and print 1 when run.
D
The program will compile without error and print 2 when run.
Question 994Single Answer
What will be the result of attempting to compile and run the following program ?
Class Polymorphism2
public static void main(String [ ] args) {
A refl = new Co ):
B ref2 = (B) refl;
System.out.printIn(ref2.go( );
}
}
class A {
private int f ( ) { return 0;}
public int g ( ) { return 3;}
Class B extends A {
private int f ( ) {return 1;}
public int g() { return f ( );}
}
class C extends B {
public int f ( ) {return 2;}
}
Select the one correct answer.
A
The program will fail to compile
B
The program will compile without error and print 0 when run.
C
The program will compile without error and print 1 when run.
D
The program will compile without error and print 2 when run.
Question 995Single Answer
Given the following class definitions and declaration statements, which one of these as signments is legal at compile time ?
//Definitions:
interface A { }
class B { }
class C extends B implements A { }
class D implements A { }
//Declaration statements:
//[ ....]
B b = new B ();
C c = newC ( );
D d = new D();
//[ ....]
Select the one correct answer:
A
c = d;
B
d = c;
C
Aa = d;
D
d = (D) c;
Question 996Single Answer
Given the following class defintions and the reference declarations, what can be said about the statement y = (Sub) x ?
//Class definitions:
class Super [ ] class
Sub extends Super { }
//Reference declarations
//.....
Super x;
Sub y;
//...
Select the one correct answer.
A
Illegal at compile time.
B
legal at compile time, but might be illegal at runtime.
C
Definitely legal at runtime, but the (Sub) cast is not strictly needed.
D
Definitely legal at runtime, and the (Sub) cast is needed.
Question 997Single Answer
Which is the first line that will cause compilation to fail in the following program ?
//Filename: MyClass:java
classMyclass {
public static void main (String [ ] args) {
My class a;
My subclass b;
a = new My class(); //(1)
b = new MySubclass(); //(2)
a = bi //(3)
b = ai //(4)
a = new MySubclass( ); //(5)
b = new MyClass (); //(6)
}
}
Class MySubClass extends My class { }
Select the one correct answer.
A
Line labeled (3).
B
Line labeled (4).
C
Line labeled (5).
D
Line labeled (6).//
Question 998Single Answer
Given the following definitions and reference declarations, which one of the following assignments is legal ?
//Definitions:
interface II
interface I2 { }
class C1 implements I1 { }
class C2implemtns 12 { }
class C3 extends C1 implements 12 { }
//Reference declarations:
//.....
C1 obj1;
C2 obj2;
C3 obj3;
//...
Select the one correct answer.
A
obj3 = obj2;
B
I1 a = obj2;
C
I1 b = obj3;
D
12 c = obj1;
Question 999Single Answer
What will the following program print when run ?
//Filename:MyClass.java
public class Myclass {
public static void main (String [ ] args) {
B b = new B ("Test");
}
}
class A
{
A ( ) { this("1", "2"); }
A(Strings, Stringt) { this (s +t); }
A(String s) { System.out.printIn(s);}
} class B extends A
{
B(Strings) {System.out.printIn(s);}
B (Strings, string t) {this (t + s + "3"); }
B ( ) { Super("4"); };
}
Select the one correct answer .
A
It will print Test followed by Test.
B
It will print 123 followed by Test
C
It will print 12 followed by Test.
D
It will print 4 followed by Test.
Question 1000Single Answer
Which statement is true about the following code ?
//Filename:MyClass.java
abstract class MyClass implements Interface1, Interface2 {
public void f ( ) { }
public void g () { }
}
interface interfacel {
int VAL A = 1;
int VAL_B = 2;
void f ( );
void g();
}
interface Interface1 {
int VAL _B = 3;
int VAL_C=4;
void g();
void h ();
Select the one correct answer.
A
My Class only implemtns Interface Implementation for void h () from Interface 2 is missing
B
The declarations of void go in the two interface conflict, therfore, the code will not compile.
C
The declarations of int VAL B in the two interfaces conflict, therfore, the code will not compile
D
Nothing is wrong with the code, it will compile without erros.