BPSC TRE 1.0 (2023) Computer Science Class 11-12 — Previous Year Paper
All 119 questions of BPSC TRE 1.0 (2023) Computer Science Class 11-12 — Previous Year Paper with the correct answer from the official answer key and a solution. Read them free on UTpaper, or attempt the paper as a timed online test.
Q1BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
How many three-digit numbers are divisible by 5?
A180
B200
C120
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) 180
Explanation
Three-digit multiples of 5 run from 100 to 995: (995 − 100)/5 + 1 = 180.
Q2BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
The value of (1 + 1/2)(1 + 1/3)(1 + 1/4) … (1 + 1/120) is
A60·5
B30·0
C40·5
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) 60·5
Explanation
The product is (3/2)(4/3)(5/4)…(121/120), which telescopes to 121/2 = 60.5.
Q3BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
The distance between Delhi and Agra is 200 km. Suppose you are travelling from Delhi to Agra by a car. If you can maintain an average speed of 90 km/hr for 120 km and 40 km/hr for the remaining distance, how much time will you take, on average, to reach Agra?
A3 hr 20 min
B3 hr 30 min
C4 hr 45 min
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) 3 hr 20 min
Explanation
120 km at 90 km/h takes 4/3 h = 1 h 20 min; the remaining 80 km at 40 km/h takes 2 h; total 3 h 20 min.
Q4BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
10% loss on selling price is what percent loss on cost price?
A9 1/11 %
B9 2/11 %
C10%
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) 9 1/11 %
Explanation
Let SP = 100; loss = 10, so CP = 110. Loss on CP = 10/110 × 100 = 100/11 = 9 1/11 %.
Q5BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
A pizza boy delivered two-fifths of his pizzas on day 1, three-fourths of his pizzas on day 2 and 16 of 9 his pizzas on day 3. On which day did he deliver the most pizzas if he had the same number of pizzas in the beginning of each day?
ADay 1
BDay 2
CDay 3
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) Day 2
Explanation
Reading the garbled day-3 figure as 9/16: 2/5 = 0.40, 3/4 = 0.75, 9/16 ≈ 0.56. Starting with the same number each day, day 2 has the largest fraction.
Q6BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
The cost of carpeting a room 18 m long with a carpet 75 cm wide at ₹4.50 per metre is ₹810. The breadth of the room is
A7 m
B7·5 m
C8 m
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) 7·5 m
Explanation
Carpet length = 810/4.50 = 180 m; area = 180 × 0.75 = 135 m²; breadth = 135/18 = 7.5 m.
Q7BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
Two persons A and B complete a task in 15 days, when they work together. Person A completes the task in 20 days if he works alone. How many days will B take to finish the task alone?
A35 days
B25 days
C60 days
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) 60 days
Explanation
B's one-day work = 1/15 − 1/20 = (4 − 3)/60 = 1/60, so B alone takes 60 days.
Q8BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
The sum of the numerator and denominator of a fraction is 11. If 1 is added to the numerator and 2 is subtracted from the denominator, it becomes 2/3. The fraction is
A5/6
B6/5
C3/8
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) 3/8
Explanation
Let the fraction be n/d with n + d = 11. (n + 1)/(d − 2) = 2/3 gives 3n + 3 = 2d − 4. Using d = 11 − n: 5n = 15, so n = 3, d = 8, giving 3/8.
Q9BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
An isotropic source of 2 candela produces light flux equal to
A2π lumen
B4π lumen
C8π lumen
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) 8π lumen
Explanation
An isotropic source emits into the full solid angle 4π sr, so flux = 4π × I = 4π × 2 = 8π lumen.
Q10BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
The spray bottles used as window or household cleaner or perfume sprayer work on
Acapillary action
BBernoulli’s principle
CPascal’s law
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) Bernoulli’s principle
Explanation
Fast-moving air over the tube top lowers pressure there (Bernoulli's principle), so the liquid is pushed up and sprayed out.
Q11BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
The trade name of basic lead carbonate is
Awhite lead
Bred lead
Clitharge
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) white lead
Explanation
Basic lead carbonate, 2PbCO₃·Pb(OH)₂, is called white lead and was used as a white pigment. Red lead is Pb₃O₄ and litharge is PbO.
Q12BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
Which of the following elements has the largest atomic radius?
ALithium
BBeryllium
CBoron
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Lithium
Explanation
Atomic radius decreases across a period as nuclear charge increases, so in Li, Be, B the largest is lithium.
Q13BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
The phenomenon of photoperiodism in plants was discovered by
AGarner and Allard
BSteward and Salisbury
CThimann and Skoog
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Garner and Allard
Explanation
W. W. Garner and H. A. Allard discovered photoperiodism in 1920 while studying flowering in tobacco (Maryland Mammoth).
Q14BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
Silent Valley of Kerala is preserved because
Ait contains very rare species of plants and animals
Bthe soil is rich in minerals
Cthe areas of land were used extensively for agriculture purposes
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) it contains very rare species of plants and animals
Explanation
Silent Valley National Park is protected for its rare, undisturbed tropical evergreen rainforest and endangered species such as the lion-tailed macaque.
Q15BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
During normal respiration in a mammal, the diaphragm is
Aarched
Bflattened
Clowered
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (D) More than one of the above
Explanation
At rest (expiration) the diaphragm is dome-shaped or arched; during inspiration it contracts, flattens and is lowered. Normal respiration involves both, so more than one option is correct.
Q16BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
The most important cell type associated with the immunity of the body is
Aplatelets
Blymphocytes
CRBCs
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) lymphocytes
Explanation
Lymphocytes (B and T cells) give specific immunity by making antibodies and killing infected cells. Platelets help clotting and RBCs carry oxygen.
Q17BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
The book entitled, Gyan Deepak was authored by a great saint
ASalar Masood Ghazi
BDariya Saheb
CImam Shah Faqih
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) Dariya Saheb
Explanation
Gyan Deepak was written by Dariya Saheb, an 18th-century saint-poet of Bihar (Dharkandha, Rohtas) who founded the Dariyapanthi sect.
Q18BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
Which agency in India has launched UTSAH portal?
AUGC
BAICTE
CMCI
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) UGC
Explanation
The UGC launched the UTSAH (Undertaking Transformative Strategies and Actions in Higher Education) portal in 2019 to improve quality in higher education.
Q19BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
A. P. J. Abdul Kalam Satellite Launch Vehicle Mission was launched on
A13th February, 2023
B20th February, 2023
C19th February, 2023
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) 19th February, 2023
Explanation
The Dr. A. P. J. Abdul Kalam Students Satellite Launch Vehicle Mission was launched on 19 February 2023 from Pattipulam near Chennai, carrying 150 student-built PICO satellites.
Q20BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
In which city was the first pure green hydrogen plant commissioned?
AHyderabad
BMumbai
CPune
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (E) None of the above
Explanation
India's first 99.999% pure green hydrogen plant was commissioned by Oil India Ltd at Jorhat, Assam in April 2022, a city not among the options.
Q21BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
Which year has been declared by the UNO as the ‘International Year of Millets’?
A2023
B2022
C2024
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) 2023
Explanation
The UN General Assembly declared 2023 the International Year of Millets, on a proposal by India.
Q22BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
Who among the following won the 2022 Nobel Peace Prize?
AAles Bialiatski
BNadia Murad
CMaria Ressa
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Ales Bialiatski
Explanation
The 2022 Nobel Peace Prize went to Belarusian activist Ales Bialiatski with the organisations Memorial (Russia) and the Center for Civil Liberties (Ukraine). Nadia Murad won in 2018 and Maria Ressa in 2021.
Q23BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
Who is the Chairman of the State Commission for Backward Classes appointed by the Bihar Government on 2nd January, 2022?
AJustice Sanjay Kumar
BJustice Balmiki Prasad Sinha
CJustice Iqbal A. Ansari
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Justice Sanjay Kumar
Explanation
As per the official key, retired Justice Sanjay Kumar was appointed Chairman of the Bihar State Commission for Backward Classes in January 2022.
Q24BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
Which was the first movie in Bhojpuri?
AGanga Maiya Tohe Piyari Chadhaibo
BKanyadan
CNadiya Ke Paar
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Ganga Maiya Tohe Piyari Chadhaibo
Explanation
'Ganga Maiya Tohe Piyari Chadhaibo' (1963), encouraged by Dr. Rajendra Prasad, was the first Bhojpuri film. 'Nadiya Ke Paar' (1982) came much later.
Q25BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
Arrange the following thermal power projects of India from east to west:
1. Kota
2. Namrup
3. Obra
4. Parichha
Select the correct answer using the codes given below.
A1, 2, 3, 4
B2, 4, 1, 3
C2, 3, 4, 1
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) 2, 3, 4, 1
Explanation
From east to west: Namrup (Assam), Obra (Sonbhadra, UP), Parichha (Jhansi, UP), Kota (Rajasthan), i.e. 2, 3, 4, 1.
Q26BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
Which type of climate is in India according to Trewartha?
ASavanna type
BSubtropical monsoon climate
CMediterranean type
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) Subtropical monsoon climate
Explanation
As per the official key, India's climate under Trewartha's scheme is described as the subtropical monsoon type (humid subtropical with dry winter, Caw, over much of the north).
Q27BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
What is the normal date of withdrawal of south-west monsoon at Hyderabad?
A1st October
B15th October
C1st November
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) 15th October
Explanation
According to IMD normal withdrawal dates, the south-west monsoon withdraws from the Hyderabad region around 15 October.
Q28BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
Which of the following States has maximum urbanization?
AGoa
BMaharashtra
CKarnataka
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Goa
Explanation
As per Census 2011, Goa is the most urbanised state, with about 62% urban population, ahead of Maharashtra and Karnataka.
Q29BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
‘Malnad’ region is associated with which of the following plateaus of India?
ATelangana Plateau
BMaharashtra Plateau
CKarnataka Plateau
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Karnataka Plateau
Explanation
Malnad is the hilly, heavily forested western part of the Karnataka Plateau along the Western Ghats; the eastern part is the Maidan.
Q30BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
South Peninsular Upland is a part of
AGondwana Land
BLaurentia Land
CAntarctica Continent
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Gondwana Land
Explanation
The Peninsular plateau is a stable block of the ancient Gondwana landmass, which split from Africa, Australia and Antarctica.
Q31BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
The percentage of population of Bihar with respect to India’s total population is
A8·58%
B10·10%
C12·25%
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) 8·58%
Explanation
Census 2011: Bihar's population of about 10.4 crore is about 8.58-8.6% of India's 121 crore.
Q32BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
Which of the following pairs is not correctly matched with respect to south of Ganga region in Bihar?
APatna–Munger
BGaya–Arwal
CPatna–Vaishali
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Patna–Vaishali
Explanation
Vaishali lies north of the Ganga, so Patna–Vaishali is not a south-of-Ganga pair. Patna, Munger, Gaya and Arwal are all south of the river.
Q33BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
Who is called the ‘Prophet of New India’?
ARaja Ram Mohan Roy
BDayananda Saraswati
CDadabhai Naoroji
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Raja Ram Mohan Roy
Explanation
Raja Ram Mohan Roy, founder of the Brahmo Samaj and a pioneer of social reform, is called the 'Prophet of New India' and 'Father of the Indian Renaissance'.
Q34BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
Which revolt is mentioned in Anandamath of Bankim Chandra Chattopadhyay?
ASannyasi
BSanthal
CIndigo
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Sannyasi
Explanation
Bankim Chandra's Anandamath (1882), which contains 'Vande Mataram', is set against the Sannyasi Rebellion in late-18th-century Bengal.
Q35BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
Who was the founder of ‘Abhinav Bharat’ in London?
AVinayak Damodar Savarkar
BP. M. Bapat
CShyamji Krishna Varma
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Vinayak Damodar Savarkar
Explanation
Vinayak Damodar Savarkar founded Abhinav Bharat (1904) and took it to London while staying at India House.
Q36BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
Where was the Ghadar Party established?
AFrance
BGermany
CUnited States of America
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) United States of America
Explanation
The Ghadar Party was founded in 1913 by Indians on the Pacific coast of the USA (San Francisco), led by Lala Har Dayal and Sohan Singh Bhakna.
Q37BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
Who was appointed as the ‘Commander in Chief’ by Birsa Munda?
ADemka Munda
BGaya Munda
CSundar Munda
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (E) None of the above
Explanation
The official BPSC key marks None of the above for this question, so none of the listed Munda leaders is accepted as the commander-in-chief appointed by Birsa Munda.
Q38BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
Who formed the Bihar Socialist Party?
APhulan Chand Tiwari and Rajendra Prasad
BPhulan Prasad Varma and Jayaprakash Narayan
CRaj Kumar Shukla and Swami Agnivesh
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) Phulan Prasad Varma and Jayaprakash Narayan
Explanation
The Bihar Socialist Party was formed in 1931 by Phulan Prasad Varma, with Jayaprakash Narayan among its leading figures.
Q39BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
In which year was the ‘Bihar Provincial Congress Committee’ formed with its headquarters at Patna?
A1908
B1910
C1906
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) 1908
Explanation
The Bihar Provincial Congress Committee was formed in 1908 with headquarters at Patna, after the first Bihar Provincial Conference held that year.
Q40BPSC TRE 1.0 (2023) Computer Science Class 11-12 · General Studies
Who established a branch of the Anushilan Samiti in Patna in 1913?
ARamananda Sinha
BSatish Jha
CSachindra Nath Sanyal
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Sachindra Nath Sanyal
Explanation
Revolutionary Sachindra Nath Sanyal set up a branch of the Anushilan Samiti in Patna in 1913, drawing students mainly from B. N. College.
Computer Science 79 questions
Q41BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following is a technique that marks the beginning of computer communications?
AUser Environment
BBatch Environment
CTime Sharing
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Time Sharing
Explanation
Time sharing let many users at remote terminals use one computer interactively at the same time, which is seen as the start of computer communications.
Q42BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which language is better for writing structured code?
APASCAL
BFORTRAN
CBASIC
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) PASCAL
Explanation
Pascal was designed by Niklaus Wirth to teach structured programming. It has block structure and control structures, so it is better suited to structured code than FORTRAN or BASIC.
Q43BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which language does a browser use to display information from the World Wide Web?
AMachine code
BAssembly language
CC++
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (E) None of the above
Explanation
Browsers display web pages written in HTML (with CSS and JavaScript). None of the options is HTML: machine code, assembly language and C++ are not used to describe web pages.
Q44BPSC TRE 1.0 (2023) Computer Science Class 11-12
Select the true statement for compiler.
AThe input of the compiler is source program.
BIt translates the source code into object code as a whole.
CThe output of the compiler is object code.
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (D) More than one of the above
Explanation
All three statements are true: a compiler takes the source program as input, translates the whole of it at once, and produces object code as output.
Q45BPSC TRE 1.0 (2023) Computer Science Class 11-12
_____ is used to shift processes so they are contiguous, and all free memory is in one block.
AFragmentation
BCompaction
CExternal Fragmentation
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) Compaction
Explanation
Compaction moves the processes in memory so they sit next to each other, which gathers all free memory into one block and removes external fragmentation.
Q46BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following is not a valid variable name in most programming languages?
AmyVariable
B123Variable
C_myVariable
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) 123Variable
Explanation
In most languages, identifiers cannot begin with a digit, so 123Variable is invalid. myVariable and _myVariable are valid.
Q47BPSC TRE 1.0 (2023) Computer Science Class 11-12
Secondary memory is the longterm store for programs and data while main memory holds program and data currently in use. What kind of an organization is this?
APhysical
BLogical
CStructural
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Physical
Explanation
This describes the physical organisation of memory: secondary storage keeps programs and data long-term, while main memory holds what is currently in use.
Q48BPSC TRE 1.0 (2023) Computer Science Class 11-12
If a semicolon is not used at the end of the statement, what message will be displayed by C++?
ASemicolon missing
BStatement missing
CError in statements
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (E) None of the above
Explanation
Turbo C++ reports "Statement missing ;" and modern compilers say "expected ';'". None of the listed messages matches exactly.
Q49BPSC TRE 1.0 (2023) Computer Science Class 11-12
A set of libraries that provides programmatically access to some kind of graphics 2D functions is
AGraphics package
BFormatting package
CAnimation package
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Graphics package
Explanation
A graphics package is a set of libraries, such as graphics.h, that gives programs functions for drawing 2D graphics.
Q50BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which shortcut key is used to compile and run the program in C++?
AAlt+F9
BAlt+F5
CCtrl+F9
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Ctrl+F9
Explanation
In Turbo C++, Ctrl+F9 compiles and runs the program. Alt+F9 only compiles, and Alt+F5 shows the output screen.
Q51BPSC TRE 1.0 (2023) Computer Science Class 11-12
What does the control unit generate to control other units?
ATiming signals
BCommand signals
CControl signals
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Control signals
Explanation
The control unit sends control signals (timing and control pulses) to the ALU, memory and I/O to direct how they work.
Q52BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following is userdefined header file extension used in C++?
Ahg
Bcpp
Ch
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) h
Explanation
User-defined header files in C++ use the .h extension, for example #include "myfile.h". .cpp is used for source files.
Q53BPSC TRE 1.0 (2023) Computer Science Class 11-12
The most common addressing technique employed by a CPU is
Adirect
Bindirect
Cimmediate
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (D) More than one of the above
Explanation
Direct, indirect and immediate addressing are all commonly used by CPUs, so more than one option applies.
Q54BPSC TRE 1.0 (2023) Computer Science Class 11-12
What will happen if the following C++ statement is compiled and executed?
int *ptr = NULL;
delete ptr;
AThe program is not semantically correct
BThe program is compiled and executed successfully
CThe program gives a compile-time error
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) The program is compiled and executed successfully
Explanation
Deleting a null pointer is a no-op that the C++ standard guarantees to be safe. The code compiles and runs normally.
Q55BPSC TRE 1.0 (2023) Computer Science Class 11-12
In various devices, _____ are used to overcome the difference in data transfer speed.
Amultiple buses
Bbuffer registers
Cspeed-enhancing circuitries
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) buffer registers
Explanation
Buffer registers temporarily hold data so that fast and slow devices, which transfer data at different speeds, can work together.
Q56BPSC TRE 1.0 (2023) Computer Science Class 11-12
What do we use to extend the connectivity of the processor bus?
APCI bus
BMultiple bus
CSCSI bus
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) PCI bus
Explanation
A PCI bus, connected through a bridge, extends the processor bus so that more devices can be attached.
Q57BPSC TRE 1.0 (2023) Computer Science Class 11-12
In memory mapped I/O
Athe I/O devices and the memory share the same address space
Bthe I/O devices have a separate address space
Cthe memory and I/O devices have an associated address space
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) the I/O devices and the memory share the same address space
Explanation
In memory-mapped I/O, I/O device registers are given addresses in the same address space as memory. The same load and store instructions then access both.
Q58BPSC TRE 1.0 (2023) Computer Science Class 11-12
What is the addressing called that is used in an instruction of the form ADD X Y?
AIndirect
BIndex
CAbsolute
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Absolute
Explanation
In ADD X Y the operands are given by their memory addresses X and Y, which is absolute (direct) addressing.
Q59BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following correctly declares an array in C++?
Aarray{10};
Bint array;
Cint array[10];
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) int array[10];
Explanation
int array[10]; declares an array of 10 integers by giving the type, the name and the size in square brackets.
Q60BPSC TRE 1.0 (2023) Computer Science Class 11-12
SQL views are also known as
Asimple tables
Bvirtual tables
Ccomplex tables
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) virtual tables
Explanation
A view is a virtual table, the stored result of a query. It does not hold its own data and is built from the base tables when used.
Q61BPSC TRE 1.0 (2023) Computer Science Class 11-12
How many primary keys can be there in a table?
AOnly 1
BOnly 2
CDepends on number of columns
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Only 1
Explanation
A table can have only one primary key, although that key may be made of several columns (a composite key).
Q62BPSC TRE 1.0 (2023) Computer Science Class 11-12
What will be the output of the following C++ code?
#include<iostream>
#include<string>
using namespace std;
int main(int argc, char const *argv[ ])
{
char s1[6]="Hello";
char s2[6]="World";
char s3[12]=s1+" "+s2;
cout<<s3;
return 0;
}
AHello
BWorld
CError
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Error
Explanation
Char arrays cannot be joined with +. s1 + " " tries to add two pointers, which is invalid, and an array cannot be initialised from such an expression, so the code gives a compile error.
Q63BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following is not constraint in SQL?
APrimary key
BNot null
CUnion
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Union
Explanation
UNION is a set operator that combines the results of queries. PRIMARY KEY and NOT NULL are constraints.
Q64BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following is not a valid aggregate function?
ACOUNT
BCOMPUTE
CSUM
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) COMPUTE
Explanation
COUNT, SUM, AVG, MIN and MAX are aggregate functions. COMPUTE is not a standard SQL aggregate function.
Q65BPSC TRE 1.0 (2023) Computer Science Class 11-12
Who is the father of computer?
AJames Gosling
BCharles Babbage
CDennis Ritchie
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) Charles Babbage
Explanation
Charles Babbage designed the Difference Engine and the Analytical Engine, so he is called the father of the computer. Gosling created Java and Ritchie created C.
Q66BPSC TRE 1.0 (2023) Computer Science Class 11-12
If we have not specified ASC or DESC after an SQL ORDER BY clause, which of the following is used by default?
ADESC
BASC
CThere is no default value
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) ASC
Explanation
ORDER BY sorts in ascending (ASC) order by default.
Q67BPSC TRE 1.0 (2023) Computer Science Class 11-12
In IA-32 architecture along with the general flags, which of the following conditional flags is provided?
ATF
BIOPL
CIF
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (D) More than one of the above
Explanation
Besides the condition flags (CF, ZF, SF, OF), the IA-32 EFLAGS register also provides TF (trap), IF (interrupt enable) and IOPL (I/O privilege level), so more than one option is correct.
Q68BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following is true about the HAVING clause?
ASimilar to the WHERE clause but is used for columns rather than groups
BSimilar to WHERE clause but is used for rows rather than columns
CSimilar to WHERE clause but is used for groups rather than rows
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Similar to WHERE clause but is used for groups rather than rows
Explanation
HAVING filters groups made by GROUP BY, while WHERE filters individual rows before they are grouped.
Q69BPSC TRE 1.0 (2023) Computer Science Class 11-12
The method of accessing the I/O devices by repeatedly checking the status flags is
Aprogram-controlled I/O
Bmemory-mapped I/O
CI/O-mapped I/O
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) program-controlled I/O
Explanation
In program-controlled I/O (polling), the CPU keeps checking a device's status flag until the device is ready.
Q70BPSC TRE 1.0 (2023) Computer Science Class 11-12
_____ clause creates temporary relation for the query on which it is defined.
AWITH
BFROM
CWHERE
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) WITH
Explanation
The WITH clause (a common table expression) defines a temporary named relation that exists only for that query.
Q71BPSC TRE 1.0 (2023) Computer Science Class 11-12
The SQL statement SELECT ROUND (65.726, -1) FROM DUAL; prints
A70
Bgarbage
C726
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) 70
Explanation
ROUND(65.726, −1) rounds to the nearest ten, because a negative position counts left of the decimal point, so 65.726 becomes 70.
Q72BPSC TRE 1.0 (2023) Computer Science Class 11-12
The matrix contains m rows and n columns. The matrix is called Sparse Matrix if
Atotal number of zero elements > (m × n)/2
Btotal number of zero elements = m + n
Ctotal number of zero elements = m / n
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) total number of zero elements > (m × n)/2
Explanation
A matrix is sparse when most of its elements are zero, meaning more than half of the m × n elements.
Q73BPSC TRE 1.0 (2023) Computer Science Class 11-12
_____ command makes the updates performed by the transaction permanent in the database.
AROLLBACK
BCOMMIT
CTRUNCATE
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) COMMIT
Explanation
COMMIT makes the changes made by a transaction permanent. ROLLBACK undoes them, and TRUNCATE removes all rows from a table.
Q74BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following is the basic approach for joining tables?
AUnion JOIN
BNatural JOIN
CSubqueries
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (D) More than one of the above
Explanation
Tables can be joined with join operations such as natural join and union join, or by using subqueries, so more than one option applies.
Q75BPSC TRE 1.0 (2023) Computer Science Class 11-12
What is the time complexity of an infix to postfix conversion algorithm?
AO(N log N)
BO(N²)
CO(N)
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) O(N²)
Explanation
Note: the answer key gives (B), but infix-to-postfix conversion scans each symbol once and pushes and pops each operator at most once on the stack, so it takes O(N) time.
Q76BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following is the advantage of the array data structure?
AElements of mixed data types can be stored
BEasier to access the elements in an array
CIndex of the first element starts from 1
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) Easier to access the elements in an array
Explanation
Array elements are stored next to each other, so any element can be reached directly by its index in O(1) time. Arrays hold only one data type, and indexing starts at 0.
Q77BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which data structure is mainly used for implementing the recursive algorithm?
AQueue
BStack
CBinary tree
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) Stack
Explanation
Recursion uses a stack. Each call pushes an activation record, and the record is popped when the call returns.
Q78BPSC TRE 1.0 (2023) Computer Science Class 11-12
What is the postfix expression for the corresponding infix expression?
a + b * c + (d * e)
Aabc*+de*+
Babc+*de*+
Ca+bc*de+*
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) abc*+de*+
Explanation
For a + (b*c) + (d*e): bc* is added to a to give abc*+, then de* is added to give abc*+de*+.
Q79BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which one of the following is not the type of queue?
ALinear queue
BCircular queue
CDouble-ended queue
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (E) None of the above
Explanation
Linear, circular and double-ended queues (deques) are all real types of queue, so none of the options is wrong.
Q80BPSC TRE 1.0 (2023) Computer Science Class 11-12
The necessary condition to be checked before deletion from the queue is
Aoverflow
Bunderflow
Crear value
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) underflow
Explanation
Before deleting, check for underflow (an empty queue). Overflow is checked before inserting.
Q81BPSC TRE 1.0 (2023) Computer Science Class 11-12
After performing following set of operations, what does the final list look contain?
InsertFront(10);
InsertFront(20);
InsertRear(30);
DeleteFront( );
InsertRear(40);
InsertRear(10);
DeleteRear( );
InsertRear(15);
display( );
A10 30 10 15
B20 30 40 15
C10 30 40 15
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) 10 30 40 15
Explanation
After the steps the deque is: 10; 20 10; 20 10 30; 10 30; 10 30 40; 10 30 40 10; 10 30 40; then 10 30 40 15.
Q82BPSC TRE 1.0 (2023) Computer Science Class 11-12
A linear data structure in which insertion and deletion operations can be performed from both the ends is
Aqueue
Bcircular queue
Cdeque
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) deque
Explanation
A deque (double-ended queue) allows insertion and deletion at both the front and the rear.
Q83BPSC TRE 1.0 (2023) Computer Science Class 11-12
If circular queue is implemented using array having size MAX_SIZE in which array index starts with 0, front points to the first element in the queue, and rear points to the last element in the queue. Which one of the following conditions is used to specify that the circular queue is empty?
AFront = rear = −1
BFront = rear = 0
CFront = rear + 1
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Front = rear = −1
Explanation
With this convention, front and rear start at −1. Front = rear = −1 means the queue is empty, and front = rear ≥ 0 means it holds one element.
Q84BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which one of the following techniques is not used in the binary tree?
ARandomized traversal
BPreorder traversal
CPostorder traversal
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Randomized traversal
Explanation
Binary trees are traversed in preorder, inorder, postorder or level order. Randomized traversal is not a standard binary tree technique.
Q85BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following is not a feature of DBMS?
AMinimum duplication and redundancy of data
BHigh-level of security
CSingle-user access only
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Single-user access only
Explanation
A DBMS supports access by many users at once (concurrency control). Single-user-only access is not a DBMS feature.
Q86BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following statements is not true about the doubly linked list?
AWe can traverse in both the directions.
BIt requires extra space.
CImplementation of doubly linked list is easier than the singly linked list.
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Implementation of doubly linked list is easier than the singly linked list.
Explanation
A doubly linked list allows traversal in both directions but needs extra space for the previous pointer. It is harder to implement than a singly linked list, not easier.
Q87BPSC TRE 1.0 (2023) Computer Science Class 11-12
The values appearing in given attributes of any tuple in the referencing relation must likewise occur in specified attributes of at least one tuple in the referenced relation, according to _____ integrity constraint.
Areferential
Bprimary
Creferencing
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) referential
Explanation
Referential integrity requires every foreign key value in the referencing relation to appear as a key value in the referenced relation.
Q88BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following options is not true about the binary search tree?
AThe value of the left child should be less than the root node.
BThe value of the right child should be greater than the root node.
CThe left and right subtrees should also be a binary search tree.
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (E) None of the above
Explanation
All three statements are true properties of a binary search tree, so none of them is false.
Q89BPSC TRE 1.0 (2023) Computer Science Class 11-12
The expression Y=AB+BC+AC shows the _____ operation.
AEX-OR
BSOP
CPOS
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) SOP
Explanation
Y = AB + BC + AC is a sum (OR) of product (AND) terms, so it is in sum-of-products (SOP) form.
Q90BPSC TRE 1.0 (2023) Computer Science Class 11-12
What are the canonical forms of Boolean expressions?
AOR and XOR
BNOR and XNOR
CSOM and POM
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) SOM and POM
Explanation
The canonical forms are sum of minterms (SOM, or canonical SOP) and product of maxterms (POM, or canonical POS).
Q91BPSC TRE 1.0 (2023) Computer Science Class 11-12
AC(A + B)DE
B[C(A + B)D + E′]
C[[C(A + B)D]E′]
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) C(A + B)DE
Explanation
The circuit gives A + B from the OR gate, then three AND gates in turn multiply it by C, D and E. So Y = C(A + B)DE, with E not inverted.
Q92BPSC TRE 1.0 (2023) Computer Science Class 11-12
Boolean algebra can be used
Afor designing the digital computers
Bin building logic symbols
Cin circuit theory
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (D) More than one of the above
Explanation
Boolean algebra is used in designing digital computers, in building logic symbols and gates, and in switching circuit theory, so more than one option applies.
Q93BPSC TRE 1.0 (2023) Computer Science Class 11-12
What does the control unit generate to control other units?
ATransfer signals
BCommand signals
CControl signals
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Control signals
Explanation
The control unit generates control signals that direct the ALU, memory and I/O units.
Q94BPSC TRE 1.0 (2023) Computer Science Class 11-12
To display time in railway stations which digital circuit is used?
ASeven-segment decoder
BEight-segment encoder
C8 : 3 multiplexer
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Seven-segment decoder
Explanation
Digital clocks at stations show digits on seven-segment displays, which are driven by seven-segment (BCD-to-7-segment) decoders.
Q95BPSC TRE 1.0 (2023) Computer Science Class 11-12
What kind of transmission medium is most appropriate to carry data in a computer network that is exposed to electrical interference?
AUnshielded twisted pair
BOptical fiber
CCoaxial cable
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) Optical fiber
Explanation
Optical fiber carries data as light, so it is immune to electromagnetic interference. Twisted pair and coaxial cable carry electrical signals that interference can affect.
Q96BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which network topology requires a central controller or hub?
AStar
BMesh
CRing
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Star
Explanation
In a star topology every device is connected to a central hub or switch, which controls the communication.
Q97BPSC TRE 1.0 (2023) Computer Science Class 11-12
A collection of hyperlinked documents on the Internet forms the
AWorld Wide Web (WWW)
Be-mail system
Cmailing list
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) World Wide Web (WWW)
Explanation
The World Wide Web is the collection of hypertext documents (web pages) on the Internet that are linked by hyperlinks.
Q98BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following is not a step in the Header translation procedure?
AThe IPv6 mapped address is changed to an IPv4 address by extracting the rightmost 32 bits
BThe value of the IPv6 priority field is discarded
CThe IPv6 flow label is considered
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) The IPv6 flow label is considered
Explanation
When an IPv6 header is translated to IPv4, the flow label is ignored. Using it is not part of the procedure, whereas extracting the rightmost 32 bits and dropping the priority are.
Q99BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which one of the following would breach the integrity of a system?
ALocking the room to prevent theft
BFull access rights for all users
CFitting the system with an anti-theft device
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) Full access rights for all users
Explanation
Giving every user full access rights lets anyone change or delete data, which breaks integrity. Locks and anti-theft devices protect the system.
Q100BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which sublayer of the data link layer performs data link functions that depend upon the type of medium?
ALogical link control sublayer
BMedia access control sublayer
CNetwork interface control sublayer
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) Media access control sublayer
Explanation
The MAC sublayer handles functions that depend on the medium, such as framing and access control for Ethernet or Wi-Fi. LLC is independent of the medium.
Q101BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which one of the following is not a network topology?
APeer-to-peer
BRing
CBus
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Peer-to-peer
Explanation
Peer-to-peer is a network architecture (model), not a topology. Ring and bus are physical topologies.
Q102BPSC TRE 1.0 (2023) Computer Science Class 11-12
How do structures and classes in C++ differ?
AStructures by default hide every member whereas classes do not
BIn structures, members are public by default, whereas, in classes, they are private by default
CStructures cannot have private members, whereas classes can have
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (D) More than one of the above
Explanation
Note: the answer key gives (D), but only (B) is correct: struct members are public by default and class members are private by default. C++ structures can also have private members, so (C) is false.
Q103BPSC TRE 1.0 (2023) Computer Science Class 11-12
When the mail server sends mail to other mail servers it becomes
ASMTP client
BSMTP server
Cpeer
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) SMTP client
Explanation
When a mail server sends mail to another mail server, it acts as an SMTP client and the receiving server acts as the SMTP server.
Q104BPSC TRE 1.0 (2023) Computer Science Class 11-12
The length of an IPv6 address is
A32 bits
B64 bits
C256 bits
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (E) None of the above
Explanation
An IPv6 address is 128 bits long. None of the listed sizes (32, 64, 256) is right; 32 bits is IPv4.
Q105BPSC TRE 1.0 (2023) Computer Science Class 11-12
What is the use of ios::trunc mode?
ATo open a file in input mode
BTo open a file in output mode
CTo truncate an existing file to zero
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) To truncate an existing file to zero
Explanation
ios::trunc discards the contents of an existing file when it is opened, cutting its length to zero.
Q106BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which layer of the TCP/IP stack corresponds to the OSI model transport layer?
AHost-to-host
BApplication
CInternet
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Host-to-host
Explanation
The TCP/IP host-to-host (transport) layer matches the OSI transport layer and provides TCP and UDP.
Q107BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following statements is/are correct?
1. It is not possible to combine two or more files opening mode in open( ) method.
2. It is possible to combine two or more files opening mode in open( ) method.
3. ios::in and ios::out are input and output file opening modes respectively.
A1, 3
B2, 3
C3 only
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (D) More than one of the above
Explanation
Official BPSC final answer key: (D). Note: by the usual reading only statements 2 and 3 are correct, i.e. option (B).
Q108BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following is true with regard to the ping command?
APing stands for Packet Internet Generator.
BThe ping command checks the port level connectivity between source destinations endpoints.
CPing summarizes the packet loss and round-trip delay between two IP endpoints.
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Ping summarizes the packet loss and round-trip delay between two IP endpoints.
Explanation
Ping (Packet InterNet Groper) uses ICMP echo messages to report packet loss and round-trip time. It does not check ports.
Q109BPSC TRE 1.0 (2023) Computer Science Class 11-12
The correct statement for a function that takes pointer to a float, a pointer to a pointer to a char and returns a pointer to a pointer to an integer is
Aint **fun(float **, char **)
Bint *fun(float *, char *)
Cint **fun(float *, char **)
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) int **fun(float *, char **)
Explanation
The function takes a float* and a char** and returns an int**, so the correct declaration is int **fun(float *, char **).
Q110BPSC TRE 1.0 (2023) Computer Science Class 11-12
The private key in asymmetric key cryptography is kept by
Asender
Breceiver
Csender and receiver
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) receiver
Explanation
Each party keeps its own private key secret. In public-key encryption, the receiver decrypts with the private key that only the receiver holds.
Q111BPSC TRE 1.0 (2023) Computer Science Class 11-12
What will be the output of the following C++ code?
#include<iostream>
using namespace std;
long factorial (long a)
{
if (a>1)
return (a * factorial (a+1));
else
return(1);
}
int main( )
{
long num = 3;
cout <<num<<"!="<<factorial (num);
return 0;
}
A6
B24
CSegmentation fault
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Segmentation fault
Explanation
factorial(a + 1) makes the argument grow (3, 4, 5, ...), so a > 1 is never false. The recursion never ends, the stack overflows, and the program crashes with a segmentation fault.
Q112BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following features must be supported by any programming language to become a pure object-oriented programming language?
AEncapsulation
BInheritance
CPolymorphism
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (D) More than one of the above
Explanation
A pure object-oriented language must support encapsulation, inheritance and polymorphism (along with abstraction and objects), so all three are required.
Q113BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which is correct syntax of inheritance?
Aclass base_classname : access derived_classname {/*define class body*/};
Bclass derived_classname : access base_classname {/*define class body*/};
Cclass derived_classname : base_classname {/*define class body*/};
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (D) More than one of the above
Explanation
Both (B) and (C) are valid: class derived : access base { }; and, without an access specifier, class derived : base { }; where the default is private for classes.
Q114BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which one of the following is the correct definition of “is_array( );” function in C++?
AIt checks that the specified variable is of the array or not
BIt checks that the specified array is of single dimension or not
CIt checks that the specified array is of multi-dimension or not
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) It checks that the specified variable is of the array or not
Explanation
std::is_array<T> (in <type_traits>) checks whether a given type is an array type, returning true or false.
Q115BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following statements is correct about the class?
AAn object is an instance of its class.
BA class is an instance of its object.
CAn object is the instance of the data type of that class.
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) An object is an instance of its class.
Explanation
A class is a blueprint, and an object is an instance of its class. The reverse statement is wrong.
Q116BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following can be used to create an abstract class in the C++ programming language?
ABy using the pure virtual function in the class
BBy declaring a virtual function in the base class
CBy declaring the virtual keyword afterward the class declaration
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) By using the pure virtual function in the class
Explanation
A class becomes abstract when it has at least one pure virtual function, for example virtual void f() = 0;. Such a class cannot be instantiated.
Q117BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following statements is correct about the C++ programming language?
AIn C++, both the static and dynamic types checking are allowed.
BIn C++, member function are allowed to be of the type const.
CIn C++, dynamic checking is allowed.
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (D) More than one of the above
Explanation
All three statements are true. C++ does static type checking at compile time and dynamic checking with RTTI and dynamic_cast, and member functions can be declared const.
Q118BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which feature of OOP is indicated by the following code?
class student{int marks;};
class topper: public student{int age;
topper(int age) {this.age=age;}};
AEncapsulation and inheritance
BInheritance and polymorphism
CPolymorphism
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Encapsulation and inheritance
Explanation
Data hidden inside the classes shows encapsulation, and topper deriving from student with public shows inheritance. There is no overloading or overriding, so polymorphism is not shown.
Q119BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following natural elements is the primary element in computer chips?
ACarbon
BSilicon
CIron
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) Silicon
Explanation
Computer chips are made mainly from silicon, a semiconductor used for transistors and integrated circuits.