Most Important 25 Set MCQs
SET 1
1. To insert a record into a table, we use
a) Insert
b) Delete
c) Alter
d) All of the above
2. Which is a database software?
a) SQL
b) MYSQL
c) Oracle
d) All of the above
3. A topology where all the nodes are connected to each
other.
a) Star
b) Bus
c) Tree
d) Mesh
4. In JavaScript, switch control structure supports
a) Integer values for case
b) Floating values for case
c) String values for case
d) All of the above
5. To use CSS codes in our HTML files, we enclose it between
a) <script> and </script>
b) <style> and </style>
c) <head> and </head>
d) None of the above
6. What would be the output?
#include <stdio.h>
int f(int x)
{
return x;
}
int main()
{
f(7);
printf("result=%d",f(8));
return 0;
}
a) 0
b) 9
c) 2
d) 8
Note: Explanation: f(7); is called but unused. f(8)
returns 8, which is printed.
7. The process of creating multiple classes from an existing
class is called … inheritance.
a) Single
b) Multiple
c) Hierarchical
d) Multilevel
8. ‘SDLC’ stands for
a) System Development Life Cycle
b) Standard Development Life Cycle
c) Special Development Life Cycle
d) All of the above
9. Which is the example of cloud?
a) Amazon Web Services (AWS)
b) Dropbox
c) Cisco WebEx
d) All of the above
SET 2
1. Which of the following is the basic structure of SQL to
create table in database?
a) CREATE table (field1 data_type, field2 data_type,…….)
b) CREATE table table_name (field1 data_type, field2
data_type,…….)
c) CREATE table table_data (field1 data_type, field2 data_type,…….)
d) All of the above
2. Which of the following is not an example of DML (Data
Manipulation Language)?
a) INSERT
b) UPDATE
c) DELETE
d) GRANT
3. Computer Network is
a) Collection of hardware components and computers
b) Interconnected by communication channels
c) Sharing of resources and information
d) All of the Above
4. …………………………… is not the phase of waterfall model.
a) Requirement analysis
b) Testing
c) Build prototype
d) Maintenance
5. Which of the following syntax is correct to embed
JavaScript to HTML?
a) <script href="demo.js">
b) <script link="demo.js">
c) <script name="demo.js">
d) <script src="demo.js">
6. The prevention of data from unauthorized access
is………………..
a) Data security
b) Data integrity
c) Data misuse
d) All of above
7. The delivery of computing services over the internet
rather than having local servers or personal devices handle applications is
called………….
a) Cloud Computing
b) Analog Computing
c) Mobile Computing
d) All of the above
8. A variable which holds memory address of another variable
is………
a) Function
b) Pointer
c) Array
d) Structure
9. Binding the data with the code that manipulates it is
………………….
a) Polymorphism
b) Encapsulation
c) Inheritance
d) Abstraction
1. The key that identifies each record uniquely, is called
a) Primary key
b) Unique key
c) Key record
d) Field name
2. Which forms simplifies and ensures that there are minimal
data aggregates and repetitive groups?
a) 1NF
b) 2NF
c) 3NF
d) All of the mentioned
3. Which of the following is/are the main goals of a
distributed database?
a) Interconnection of database
b) Incremental growth
c) Reduced communication overhead
d) All of the above
4. Which of the following is a ternary operator in JS?
a) -
b) ?:
c) +
d) :
5. PHP stands for ...
a) Hypertext Processor
b) Hyper Markup Processor
c) Hyper Markup Preprocessor
d) Hypertext Preprocessor
6. What is the first octet value of class A IP?
a) 0-126
b) 128-191
c) 224-239
d) 192-223
Note: Class A IP addresses have a first octet range
of 0 to 126 (127 is reserved for loopback).
7. The function
int fibo()
{
Statements;
}
is called
a) Function declaration
b) Function definition
c) Function end
d) None of the above
8. What is an abstraction in object-oriented programming?
a) Hiding the implementation and showing only the
features
b) Hiding the important data
c) Hiding the implementation
d) Showing the important data
9. Agile Software Development is based on which of the
following type?
a) Iterative Development
b) Incremental Development
c) Both Incremental and Iterative Development
d) Linear Development
SET 4
1. Which of the following is a group of one or many
attributes that uniquely identifies a row?
a) Key
b) Determinant
c) Tuple
d) Relation
2. In general, a file is basically a collection of all
related
a) Rows & Columns
b) Fields
c) Database
d) Records
3. Give an example of half duplex mode of data
communication.
a) TV
b) Radio
c) Walkie-Talkie
d) Internet
4. Which of the following can’t be done with client-side
JavaScript?
a) Validating a form
b) Sending a form’s content by email
c) Storing the form’s contents to a database file on the
server
d) None of the above
5. Which one of the following should not be used while
sending password or other sensitive information?
a) GET
b) POST
c) REQUEST
d) NEXT
Note: GET should not be used for sensitive data as it
exposes information in the URL. Always use POST for sensitive data.
6. What will fopen return if there is any error while
opening a file?
a) Nothing
b) NULL
c) EOF
d) Depends upon compiler
7. Which feature of OOP indicates code reusability?
a) Abstraction
b) Polymorphism
c) Encapsulation
d) Inheritance
8. Which of the following is the first step in SDLC
framework?
a) Feasibility Study
b) Requirement Gathering
c) Communication
d) System Analysis
9. Which segment of e-commerce model does eBay belong to?
a) B2B
b) B2C
c) C2B
d) C2C
Note: eBay primarily operates as a C2C platform where
consumers sell to other consumers.
SET 5
1. Which of the following is an example of DML?
Options:
a) CREATE
b) UPDATE
c) DROP
d) ALTER
Note: UPDATE is a Data Manipulation Language (DML)
command, while CREATE, DROP, and ALTER are Data Definition Language (DDL)
commands.
2. Which query is used to select records from a table named
"students" where the value of column roll_no = 02?
a) SELECT * FROM students.
b) SELECT * FROM STUDENTS WHERE roll_no = 02
c) SELECT * FROM STUDENTS HAVING roll_no = 02
d) SELECT * FROM roll_no = 02
3. Which of the following is a programming language to make
our webpages dynamic?
a) JavaScript
b) HTML
c) CSS
d) ActionScript
Note: JavaScript is used to add interactivity and
dynamic behaviour to webpages. HTML is for structure and CSS for styling
4. In OOP, the focus is given to which of the following
entities?
a) Data
b) Functions
c) Structured
d) All of the above
Note: Object-Oriented Programming (OOP) primarily
focuses on data (objects) rather than functions or procedures, though methods
(functions) are part of objects.
5. What is the tag used to insert links in HTML?
a) <a>
b) <p>
c) <h1>
d) <font>
Note: The <a>
(anchor) tag is used to create hyperlinks in HTML (e.g., <a
href="url">Link</a>). Other tags are for paragraphs
(<p>), headings (<h1>), and deprecated styling (<font>).
6. Which of the following is not a proper file operation
mode?
a) close
b) read
c) write
d) append
Note: File operation modes include read, write, and
append. "close" is a method to terminate file access, not a mode.
7. Which of the following is the first step in the SDLC
framework?
Options:
a) Feasibility Study
b) Requirement Gathering
c) Communication
d) System Analysis
8. MAN Stands for ______.
a) Metropolitan Area Network
b) Main Area Network
c) Metropolitan Access Network
d) Metro Access Network
Note: MAN (Metropolitan Area Network) covers a city
or large campus, larger than a LAN but smaller than a WAN.
9. IoT stands for
a) Internet of This
b) Internet of That
c) Internet of Things
d) Internet or Thing
Note: IoT (Internet of Things) refers to
interconnected physical devices (e.g., smart devices) that communicate via the
internet.
SET 6
1. Which of the following is not a function of the database?
a) Managing stored data
b) Manipulating data
c) Security for stored data
d) Analyzing code
Note: Databases manage,
manipulate, and secure data, but they don't analyze code (a function of
compilers/IDEs).
2. Network that covers geographic areas that are larger,
such as districts or cities is
a) LAN
b) MAN
c) WAN
d) None of these
Note: MAN (Metropolitan Area Network) covers
cities/districts. LAN is local, and WAN is larger (e.g., countries).
3. What will be the output of the following JavaScript code?
<script type="text/javascript">
a = 5 + '9';
document.write(a);
</script>
a) Compilation Error
b) 14
c) Runtime Error
d) 59
Note: JavaScript performs
string concatenation when adding a number (5) to a string ('9'), resulting in
'59'.
4. Which of the following is the first step in SDLC
framework?
a) Feasibility Study
b) Requirement Gathering
c) Communication
d) System Analysis
Note: The Software Development Life Cycle (SDLC)
typically starts with gathering requirements.
5. In OOP, by wrapping up characteristics and behaviour into
one unit, we achieve
a) Data Abstraction
b) Data Encapsulation
c) Data Hiding
d) All of these
Note: Encapsulation bundles data (characteristics)
and methods (behaviour) into a single unit (class).
6. Which of the following is used to insert JavaScript code
into an HTML page?
a) <script>...<script>
b) <script>...<//script>
c) <script>...</script>
d) </script>
7. What will be the output of the following C code?
#include <stdio.h>
void swap(int *a, int *b) {
int t = *a;
*a = *b;
*b = t;
}
void solve() {
int a = 3, b = 5;
swap(&a,
&b);
printf("%d
%d", a, b);
}
int main() {
solve();
return 0;
}
a) 3 5
b) 5 3
c) 0 0
d) Compilation Error
Note: The swap function exchanges values of a and b
via pointers, so a becomes 5 and b becomes 3.
8. What is Artificial Intelligence?
a) A field aiming to make humans more intelligent
b) A field aiming to improve security
c) A field aiming to develop intelligent machines
d) A field aiming to mine data
Note: AI focuses on creating machines that mimic
human intelligence (e.g., learning, problem-solving).
9. Offers the ability to add, modify, update, and drop
tuples.
a) Transaction Control Language (TCL)
b) Data Control Language (DCL)
c) Data Definition Language (DDL)
d) Data Manipulation Language (DML)
Note: DML commands (e.g., INSERT, UPDATE, DELETE)
modify data. DDL defines structure, TCL manages transactions, and DCL handles
permissions.
SET 7
1. Which language is used by most of DBMSs for helping their
users to access data?
Options:
a) HLL
b) Query language
c) SQL
d) 4 GL
Note: SQL (Structured Query Language) is the standard
language used by most Database Management Systems (DBMS) for data access and
manipulation.
2. Which of the following items is not used in Local Area Networks
(LANs)?
a) Computer
b) Cable
c) Modem
d) Interface card
Note: Modems are typically used for connecting to
wide area networks (WANs) like the internet, not for local area networks
(LANs). LANs use cables, interface cards, and other networking equipment.
3. What is divide by 0 in Javascript?
var a = 10;
var b = 0;
document.write(a/b);
a) Nothing is printed
b) 0 is printed
c) Infinity is printed
d) Some Garbage Value
Note: In JavaScript, dividing a non-zero number by
zero results in Infinity, not an error or garbage value.
4. PHP scripts are enclosed within ______
Options:
a) <php> . . . </php>
b) <?php . . . ?>
c) ?php . . . ?php
d) <p>. . . . </p>
Note: PHP scripts are enclosed within <?php ...
?> tags. The other options are incorrect syntax for PHP.
5. File is a type of?
Options:
a) struct
b) int
c) char *
d) None of the above
Note: In programming, a file is typically represented
as a file pointer or stream, not as a basic data type like int, char*, or
struct.
6. If a function can perform more than 1 type of tasks,
where the function name remains same, which feature of OOP is used here?
a) Encapsulation
b) Inheritance
c) Polymorphism
d) Abstraction
Note: Polymorphism allows functions to perform
different tasks with the same name, typically through method overloading or
overriding.
7. The waterfall model suggests a systematic ______.
a) Iterative approach
b) Spiral approach
c) Sequential approach
d) None of the mentioned above
Note: The waterfall model is a linear and sequential
approach to software development, where each phase must be completed before the
next begins.
8. Robotics is a branch of AI, which is composed of ______.
a) Electrical Engineering
b) Mechanical Engineering
c) Computer Science
d) All of the above
Note: Robotics integrates Electrical Engineering (for
hardware), Mechanical Engineering (for design), and Computer Science (for AI
and control systems).
9. In how many forms BigData could be found?
a) 2
b) 3
c) 4
d) 5
Note: BigData is commonly
categorized into three forms: structured, semi-structured, and unstructured
data.
1. In the ______ normal form, a composite attribute is
converted to individual attributes:
a) First
b) Second
c) Third
d) Fourth
Note: In 1NF (First Normal Form), composite
attributes are split into individual atomic attributes to eliminate repeating
groups.
2. Which command displays name, class, and roll number of
roll number 20 from the "student" table?
a) SELECT NAME, CLASS, ROLL from student WHERE ROLL like 20
b) SELECT all ROLL from student where ROLL = 20
c) SELECT NAME, CLASS, ROLL from student where ROLL = 20
d) SELECT NAME, CLASS, ROLL in student where ROLL = 20
Note: The correct SQL syntax uses SELECT ... FROM ...
WHERE with = for exact matches. LIKE is for pattern matching (incorrect here).
3. Which is true about star network topology?
a) Each device is connected to a switch or hub
b) Each device is connected to each other
c) Each device is connected in a trunk
d) Each device is connected to a terminal
Note: In a star topology, all devices connect to a
central switch/hub, unlike mesh (b) or bus (c) topologies.
4. The use of echo in JavaScript is to ______.
a) Assign value
b) Display value
c) Echo value
d) List value
Note: JavaScript uses console.log() or
document.write() to display values. echo is a PHP function, but the closest JS
equivalent "displays" output.
5. PHP code starts with ______?
a) <?PHP
b) <?
c) <?PHP
d) ?>
Note: PHP code can start with <?PHP (long tag) or
<? (short tag). ?> is the closing tag.
6. What is the output of the given C program?
void main() {
char str1[] =
"ABC COLLEGE";
char str2[20];
strcpy(str2,
str1);
printf("%s%s%d", str1, str2, strlen(str1));
}
a) ABC COLLEGE ABC COLLEGE 16
b) ABC COLLEGE ABC COLLEGE 15
c) ABC COLLEGE 16
d) None of these(a,b,c)
Note:
Ø
str1 and str2 both contain "ABC
COLLEGE"
Ø
strlen(str1) returns 11 (letters + space).
Ø
Correct output: ABC COLLEGEABC COLLEGE11.
7. In Inheritance, a class derived is from?
a) Superclass
b) Subclass
c) Subset class
d) Relative class
Note: A derived class (subclass) inherits from a
superclass (base class).
8. ______ of the system gives long life to the new system.
a) Implementation
b) Maintenance
c) Analysis
d) Design
Note: Maintenance ensures system longevity by fixing
bugs, updating features, and adapting to changes.
9. Why is cloud computing popular nowadays?
a) Cost-sharing and easily accessible
b) As modern technology and costly
c) Accessible and freely available
d) Affordable to all
Note: Cloud computing is popular due to its
cost-efficiency (shared resources), accessibility, and scalability.
SET 9
1. Which of these is the correct order of the SDLC?
a. Analysis, Design, Coding, Testing, Implementation
b. Analysis, Design, Testing, Implementation, Coding
c. Design, Testing, Implementation, Coding, Analysis
d. Coding, Analysis, Design, Testing, Implementation
Note: The standard Software Development Life Cycle
(SDLC) phases are:
1)
Analysis (Requirements Gathering)
2)
Design (System Architecture)
3)
Coding (Implementation)
4)
Testing (Quality Assurance)
5)
Implementation (Deployment)
2. A topology in which all nodes are connected with a
central hub is called......
a. Bus
b. Star
c. Tree
d. Mesh
Note: In a star topology, all devices connect to a
central hub/switch, unlike bus (linear), tree (hierarchical), or mesh
(interconnected) topologies.
3. A variable which holds memory address of another variable
is called......
(a) Function
(b) Pointer
(c) Array
(d) Structure
Note: A pointer stores memory addresses of other
variables, enabling dynamic memory management and efficient data handling.
4. ...... means using the Internet and the web for
education.
a. E-medicine
b. E-education
c. E-health
d. E-commerce
Note: E-education (or online education) refers to
learning facilitated via the internet, distinct from e-commerce (business),
e-health (healthcare), or e-medicine (telemedicine).
5. ......is a process where you show only
"relevant" data and "hide" unnecessary details of an object
from the user.
(a) Abstraction
(b) Polymorphism
(c) Inheritance
(d) Encapsulation
Note: Abstraction focuses on exposing essential
features while hiding implementation details. Encapsulation bundles
data/methods, polymorphism allows multiple forms, and inheritance enables code
reuse.
6. Which of the following is an example of full duplex mode
of communication?
a. Mobile Phone
b. Walkie-Talkie
c. Radio
d. All of above
Note:
Ø
Full duplex: Simultaneous two-way communication
(e.g., mobile phones).
Ø
Half duplex: Alternating communication (e.g.,
walkie-talkies).
Ø
Simplex: One-way communication (e.g., radio
broadcasts).
7. The key that identifies each record uniquely, is called
a. Primary Key
b. Record Key
c. Unique Key
d. Keyword
Note: A primary key
uniquely identifies each record in a database table. Unique keys also enforce
uniqueness but aren’t necessarily primary identifiers.
8. PHP stands for
a. Hypertext preprocessor
b. Preprocessor Hypertext
c. Pre hypertext processor
d. All of the above
9. What is the correct syntax to display "Nepal"
in an alert box using JavaScript?
a. alert-box("Nepal");
b. alert("Nepal");
c. confirm("Nepal");
d. All of the Above
SET 10 (Model question issued by NEB 2079)
1. In which normal form of database, atomicity is
introduced?
A) First
B) Second
C) Third
D) Fourth
Note: Atomicity is introduced in the First Normal
Form (1NF), which requires that all attributes contain atomic (indivisible)
values.
2. Which of the following techniques is not implemented to
protect a database?
A) Rollback
B) Backup
C) Recovery
D) Firewall
Note: While firewalls protect networks, they are not
specifically a database protection technique. Rollback, backup, and recovery
are direct database protection methods.
3. Which one of the following SQL commands is executed to
display all the records having a second letter in the LNAME (LAST NAME) as “A”
from the customer table?
A) SELECT * FROM CUSTOMER WHERE LNAME LIKE “?A%”;
B) SELECT * FROM CUSTOMER WHERE LNAME LIKE “_A%”;
C) SELECT * FROM CUSTOMER WHERE LNAME LIKE “A%”;
D) SELECT * FROM CUSTOMER WHERE LNAME LIKE “%A”;
Note: The underscore _ matches any single
character, so _A% finds names where the second letter is
"A".
4. Which of the following is an incorrect IP address?
A) 192.168.0.1
B) 192.168.1
C) 172.255.0.0
D) 202.10.79.4
Note: A valid IPv4 address must have four octets
(e.g., 192.168.1.1). "192.168.1" is incomplete.
5. Which of the following is a server-side scripting
language?
A) JavaScript
B) MySql
C) PHP
D) Jquery
Note: PHP is a
server-side scripting where as JavaScript is client-side scripting language.
6. Which of the following keywords are used to declare a
variable in JavaScript?
A) int or var
B) float or let
C) var or let
D) char or var
Note: JavaScript uses var (older) and let (modern)
for variable declaration.
7. Which of the following commands is executed in PHP to
concatenate the variables $x with $y?
A) $x + $y
B) $x=$y
C) concat ($x,$y)
D) $x.$y
Note:
Operation |
PHP |
JavaScript |
String Concatenation |
$x . $y |
x + y |
8. Which statement is incorrect about the object-oriented
approach?
A) Emphasis is on data rather than procedure.
B) Data is hidden and cannot be accessed.
C) Objects communicate through functions.
D) It supports abstract data but not the class.
Note: OOP does support abstract data (via
abstraction), but it requires classes to do so.
9. Which of the following feasibility study is concerned
with cost benefit analysis?
A) Technical feasibility
B) Economic feasibility
C) Operational feasibility
D) Schedule feasibility
Note: Economic
feasibility assesses financial viability (costs vs. benefits). Other
feasibilities focus on technical, operational, or scheduling aspects.
SET 11 (Model question
issued by CDC 2078)
1. Which statements are used in DDL?
A) Create, alter and drop
B) Create, insert and select
C) Insert, update and delete
D) Delete, alter and drop
Note:
Ø
DDL (Data Definition Language) commands
define/modify database structures (e.g., CREATE, ALTER, DROP).
Ø
Options B/C include DML (Data Manipulation
Language) commands like INSERT, SELECT, UPDATE, and DELETE.
2. How to select records where "FirstName" ends
with "a"?
A) SELECT * FROM Persons WHERE FirstName = a?
B) SELECT * FROM Persons WHERE FirstName LIKE ‘a%’
C) SELECT * FROM Persons WHERE FirstName LIKE ‘%a’
D) SELECT * FROM Persons WHERE FirstName=‘%a%’
Note:
Ø
%a matches names ending with "a"
Ø
a% matches names starting with "a"
Ø
%a% matches names containing "a"
anywhere
3. True statement about star network topology?
A) Each device is connected to a switch or hub
B) Each device is connected to each other
C) Each device is connected in a trunk
D) Each device is connected to a terminal
Note: Star topology uses a central hub/switch. Other
options describe mesh (B), bus (C), or point-to-point (D) topologies.
4. Correct syntax for a JavaScript alert box?
A) alert-box(“Stay Safe”);
B) confirm(“Stay Safe”);
C) msgbox(“Stay safe”);
D) alert(“Stay Safe”);
Note:
Ø
alert() displays a popup message.
Ø
confirm() prompts for user approval.
Ø
alert-box and msgbox are invalid in JavaScript.
5. Use of the <A> tag?
A) To insert an image
B) To create a link
C) To create a hyperlink
D) To create a list
Note: The <A>
(anchor) tag creates hyperlinks (e.g., <a
href="url">Click</a>). Images use <img>, and lists use
<ul>/<ol>.
6. What is the output of the given C program?
void main(){
char str1[] =
"FIRST";
char str2[20];
strcpy(str2,str1);
printf("%s %s
",str1,str2);
printf("%d", (str1!=str2));
printf("%d", strcmp(str1,str2));
}
A) FIRST FIRST 0 0
B) FIRST FIRST 1 1
C) FIRST FIRST 1 0
D) FIRST FIRST 0 1
Ø strcpy(str2,str1)
copies "FIRST" to str2, so both print as "FIRST".
Ø (str1!=str2)
compares memory addresses (always different for distinct arrays), resulting in
1 (true).
Ø strcmp(str1,str2)
compares content (identical), returning 0 (equal).
7. Where is a class derived in inheritance?
A) Superclass
B) Subclass
C) Subsetclass
D) Relativeclass
Note: A subclass (derived class) inherits from a
superclass (base class).
8. Correct order of the SDLC?
A) Analysis, Design, Coding, Testing, Implementation
B) Analysis, Design, Testing, Implementation, Coding
C) Implementation, Coding, Analysis, Design, Testing
D) Design, Testing, Implementation, Coding, Analysis
Note: The Software Development Life Cycle (SDLC)
follows:
Analysis (Requirements) → 2. Design → 3. Coding → 4. Testing
→ 5. Implementation.
9. Why is cloud computing popular nowadays?
A) Cost-sharing and easily accessible
B) As modern technology and costly
C) Accessible and freely available
D) Affordable to all
SET 12 (NEB 2079)
1. Which of the following SQL statement is used to DELETE rows
from a database table?
A) DELETE
B) REMOVE
D) CLEAR
C) DROP
Note:
Ø
DELETE FROM table_name removes rows from a
table.
Ø
DROP deletes the entire table (structure +
data).
Ø
REMOVE and CLEAR are not standard SQL
commands.
2. A field that is used to uniquely define a particular record in
a table is called:
A) Primary Key
B) Entity
C) Relationship
D) Constraints
3. What does "MAC" stands for in MAC Address?
A) Mandatory Access Control
B) Media Access Control
C) Micro Access Control
D) Media Access Certificate
Note: A MAC Address is a hardware identifier for
network devices, assigned by the Media Access Control layer in networking.
4. What is the correct syntax for referring to an external
JavaScript script?
A) <script src="myscript.js"></script>
B) <script href="myscript.js"></script>
C) <js href="myscript.js"></js>
D) <js src="myscript.js"></js>
5. Which of the following is the correct way of defining a
variable in PHP?
A) $variable name = value;
B) $variable_name=value;
C) $variable-name = value
D) $variable name as value;
Note: PHP variables start with $, use underscores
(no spaces), and end with ;
6. What is the output of C program?
void main(){ int b=25;
//b memory location=1234;
int *p; p=&b; printf("%d %d", &b, p);}
A) 25 25
B) 1234 1234
C) 25 1234
D) 1234 25
Note: &b and p both print the memory address of
b (e.g., 1234). To print the value (25), use *p or b.
7. Which feature of OOP is illustrated the code reusability?
A) Polymorphism
B) Abstraction
C) Encapsulation
D) Inheritance
8. Which of the following is the discovering requirement from a
user in the requirement collection process?
A) Feasibility study
B) Requirement Elicitation
C) Requirement Specification
D) Requirement validation
Explanation:
Ø
Requirement Elicitation involves gathering
needs from stakeholders.
Ø
Feasibility study = Assessing viability,
Specification = Documenting, Validation = Verifying.
9. What devices are detecting and responding to changes in an
Internet of Things (IoT)? an environment that is embedded in smartphones and an
integral part of
A) Wi-Fi
B) Barcode
C) RFID
D) Sensors
Explanation:
Ø
Sensors detect changes (e.g., temperature,
motion).
Ø
Wi-Fi = Connectivity, Barcode/RFID =
Identification.
1. Which of the given sign is used as a shortcut for JQuery?
(a) the % sign
(b) the & sign
(c) the $ sign
(d) the @ sign
Explanation:
Ø
In jQuery, $ is an alias for jQuery(), used to
select elements (e.g., $("p").hide();).
Ø
Example: $("#id") is equivalent to
jQuery("#id").
2. Which of the following is DML statement?
(a) Create
(b) Select
(c) Create view Alter
(d) Drop
Ø
DML (Data Manipulation Language) includes
SELECT, INSERT, UPDATE, DELETE.
Ø
CREATE, ALTER, DROP are DDL (Data Definition
Language) commands.
3. A collection of hyperlinked documents on the internet is called
(a) HTML
(b) Webpage
(c) WWW
(d) email system
Explanation:
Ø
WWW (World Wide Web) is a system of
interlinked hypertext documents accessed via the internet.
Ø
HTML = Markup language, Webpage = Single
document, Email = Messaging system.
4. Which of the following IPv4 address valid?
(a) 192.168.1.1
(b) EEE.000.33.000
(c) 257.2.5.1
(d) 202.70.71.262
Explanation:
Ø
Valid IPv4 addresses range from 0.0.0.0 to
255.255.255.255.
Ø
Invalid options: (b) Contains letters (EEE)., (c)
257 exceeds 255., (d) 262 exceeds 255.
5. Which jQuery method is used to hide selected elements?
(a) hide()
(b) hide(on)
(c) invisible()
(d) display(none)
Explanation:
Ø
hide(): Hides selected elements by setting
their CSS display property to none.
Ø
show(): Displays hidden elements by resetting
their CSS display property.
6. Which function is used to connect to MySQL database?
(a) mysqli_open()
(b) mysqli_connect()
(c) var mysqli_query()
(d) $mysqli_con()
Explanation:
Ø
mysqli_connect() establishes a connection to
MySQL in PHP.
Ø
mysqli_query() executes queries, not
connections.
7. Which of the following is true about FILE *fpt?
(a) FILE is a keyword in c for representing files and ftp is a
variable of FILE type.
(b) FILE is a buffered stream
(c) FILE is a stream
(d) FILE is a structure and fpt is a pointer to the structure of
FILE type
8. Which of a SDLC phase is used to ensure quality software?
(a) Implementation
(b) Maintenance
(c) Testing
(d) System Study
Explanation:
Ø
Testing identifies bugs and verifies
functionality.
Ø
Implementation = Deployment.
Ø
Maintenance = Post-release updates.
Ø
System Study = Initial analysis.
9. Coaxial cable is an example of ….
(a) Communication software
(b) Guided Transmission Media
(c) Unguided Transmission Media
(d) All of the above
SET 14 (NEB 2080 Supplementary)
1. Which SQL keyword is used to retrieve data from a table?
(a) SELECT
(b) FROM
(c) WHERE
(d) JOIN
Explanation:
The SELECT keyword is used to fetch data from a database table.
Example: SELECT * FROM students;
2. Which of the following principle apply to 2NF?
(a) a table must have a primary key
(b) all non-key attributes must be dependent on the primary key
(c) all attributes must be atomic
(d) a table must have at least more than two attributes
Explanation:
2NF eliminates partial dependency, meaning all non-key attributes
must depend entirely on the whole primary key (if composite).
3. Which of the following is a device that connects two or more
networks and can filter and forward network traffic based on its destination
address?
(a) switch
(b) router
(c) hub
(d) modem
Note:
Ø
A router connects multiple networks and routes
data packets based on IP addresses.
Ø
A Bridge connects two similar networks (same
protocol) and filters traffic based on MAC addresses.
Ø
A Gateway connects two different networks with
different protocols and translates between them.
4. Which JavaScript function use to take text input?
(a) alert()
(b) prompt()
(c) confirm()
(d) console.log()
Note:
Ø
alert(): Displays a pop-up message to the user
(no input taken).
Ø
prompt(): Takes text input from the user via a
pop-up dialog box.
Ø
confirm(): Shows a dialog with OK/Cancel and
returns true or false.
Ø
console.log(): Prints output to the browser’s
console (used for debugging, not user input).
5.Which of the following PHP functions is used to connect to a
MySQL database?
(a) mysql_connect()
(b) mysqli_connect()`
(c) pdo_connect()
(d) db_connect()
Note:
1. mysqli_connect(): Establishes a connection to a MySQL database.
2. mysqli_query(): Executes a SQL query on the database.
3. mysqli_fetch_assoc(): Fetches a result row as an associative
array.
4. mysqli_fetch_array(): Fetches a result row as an associative or
numeric array.
5. mysqli_num_rows(): Returns the number of rows in a result set.
6. mysqli_close(): Closes a previously opened database connection.
7. mysqli_error(): Returns a string description of the last error.
8. mysqli_real_escape_string(): Escapes special characters in a
string for use in an SQL statement.
6. What is the correct way to open a file named “data.txt” in C
for reading?
(a) fopen(“data.txt”,”r”);
(b) fopen(“data.txt”,”w”);
(c) fopen(“data.txt”,”a”);
(d) fopen(“data.txt”,”rb”);
7. Which of the following concepts in object-oriented programming
refers to binding data and function into a single unit.
(a) Encapsulation
(b) Abstraction
(c) Polymorphism
(d) Inheritance
8. What does the term “QA” stand for in the software development
process?
(a) Quality Assurance
(b) Quality Analysis
(c) Quality Assessment
(d) Quantity Assurance
9. What type of communication technology is commonly used in IoT
devices?
(a) Wi-Fi
(b) Bluetooth
(c) Zigbee
(d) All of the above
1. Which one of the following given statements is correct?
A) Select * from emp where epdid = 103;
B) Select from emp where epdid = 103;
C) Select epdid where emp = 103 from emp;
D) Select epdid where epdid = 103 and table = emp;
Explanation:
Option A uses the correct SQL syntax:
SELECT * FROM table_name WHERE condition;
It selects all fields (*) from the emp table where the epdid is
103.
2. Which database system normally offers better performance for
geographically dispersed users?
A) Centralized database system
B) Distributed database system
C) NoSQL database system
D) Relational database system
Explanation:
A Distributed Database System stores data across multiple
locations, which makes it more efficient for users who are geographically far
apart. Centralized databases can lead to delays due to distance.
3. Which of the following is an example of a public IPv4 address?
A) 192.168.1.1
B) 172.16.0.1
C) 10.10.10.10
D) 203.0.113.10
Explanation: 203.0.113.10 is a public IP address,
typically used for internet-facing devices.
Ø
Options A, B, and C are all private IP address
ranges:
192.168.x.x
172.16.x.x to
172.31.x.x
10.x.x.x
4. What is the correct syntax for a 'for-loop' in JavaScript?
A) for (var i = 0; i < 5; i++ ) {}
B) for (i = 0; i < 5; i++) {}
C) for (var i = 0; i < 5) {}
D) for (var i < 5; i++) {}
Explanation:
A) for (var i = 0; i < 5; i++ ) {}
It includes:
·
Initialization: var i = 0
·
Condition: i < 5
·
Increment: i++
·
Curly braces for code block.
B) for (i = 0; i < 5; i++) {} is also technically valid if i
was declared earlier.
5. Which PHP function is commonly used to execute SQL queries on a
database connection established using mysqli extension?
Options:
A) mysqli_query()
B) pdo_query()
C) mysql_query()
D) pgsql_query()
1.
mysqli_connect(): Establishes a connection to a MySQL database.
2.
mysqli_query(): Executes a SQL query on the database.
3.
mysqli_fetch_assoc(): Fetches a result row as an associative array.
4. mysqli_fetch_array():
Fetches a result row as an associative or numeric array.
5.
mysqli_num_rows(): Returns the number of rows in a result set.
6.
mysqli_close(): Closes a previously opened database connection.
7.
mysqli_error(): Returns a string description of the last error.
8.
mysqli_real_escape_string(): Escapes special characters in a string for use in
an SQL statement.
6. What is the correct syntax to declare a structure in C?
A) struct { }
B) define struct { }
C) struct [ ]
D) struct <name> { }
7. In C, which operator is used to get the address of a variable?
a. *
b. &
c. ->
d. .
Note:
Ø
& is the address-of operator, used to get
the address of a variable.
Ø
is the dereference operator, used to access
the value stored at the address pointed to by a pointer.
Ø
-> is an Arrow Operator (or Structure
Pointer Operator),used to access members of a struct via a pointer.
8. Which OOP feature allows a class to inherit properties and
behaviour from another class?
A) Inheritance
B) Encapsulation
C) Polymorphism
D) Abstraction
9. Which model of SDLC is characterized by a linear progression of
phases from requirements gathering to maintenance?
A) Waterfall model
B) Agile model
C) Spiral model
D) RAD model
SET 16 (NEB 2081 Supplementary
SET A)
1) Which SQL Query selects all records from a table named
"Address" where the value of the column "Address" has its
second last letter ending with an "a"?
A) SLELECT * FROM Address WHERE Address = 'a'
B) SELECT * FROM Address WHERE Address LIKE 'a_%'
C) SELECT * FROM Address WHERE Address LIKE '% a'
D) SELECT * FROM Address WHERE Address LIKE '%a_%'
2) What is used for data security in the database?
A) Data integrity
B) Data encryption
C) Data auditing
D) Data authentication
3) Which SQL command is used to define the field ID of the table
student as PRIMARY KEY which has already been created with the schema (ID,
Name, DOB, Address)?
A) ALTER TABLE Student ADD PRIMARY KEY (ID);
B) INSERT INTO Student ID PRIMARY KEY (ID);
C) ALTER TABLE Student ADD ID PRIMARY KEY;
D) INSERT INTO Student ADD ID PRIMARY KEY;
Note: A) ALTER TABLE Student ADD PRIMARY KEY (ID); Although this
is close, it is not the correct syntax. It would be correct if the ID was not
already created.
4) What type of transmission media is commonly used in LAN
networks due to its cost-effectiveness and flexibility?
A) Twisted pair cable
B) Microwave
C) Digital subscriber line
D) Satellite
5) What is a scripting language that
runs for the browser of the user's Computer?
A)
Object-oriented programming
B)
Server-side scripting language
C)
Client-side scripting Language
D)
Structure programming Language
6) Predict
the correct output of the following PHP code.
<?php $x=30; $y = 30;
if ($x>$y) echo
"CDC, Nepal.";
else echo "NEB,
Nepal."; ?>
A) 30 is
not greater than 30.
B) CDC,
Nepal
C) NEB,
Nepal.
D) No
output.
7) Analyse
the expected output of the provided in JavaScript snippet.
<script> var
P=120, Q=O; document.write (P/Q); </script>
A) Garbage
value B) 0 C) 120 D) Infinity
is pointed
8) Which feature of OOPs is used to derive the attributes and
methods from base class?
A) Encapsulation B) Inheritance C) Polymorphism D) Data hiding
9) What is the Primary focus of the maintenance phase in the SDLC?
A) Conducting performance testing.
B) Enhancing system functionality based on user feedback.
C) Developing new features and modules for the system.
D) Documenting system requirements and specifications.
SET 17 (NEB 2081 Supplementary SET B)
1.
The statement in SQL which allows to change
the definition of a table is:
a) Delete
b) Update
c) Create
d) Alter
2.
Which of the following key is considered
unique in a table?
a) Candidate key
b) Primary key
c) Super key
d) Foreign key
3.
With SQL, how will you select records of those
employees from a table named "staff" whose salary is less than 20000?
a) Select * from staff where salary is less than 20000;
b) Select * from staff where salary <20000;
c) Select * from staff where salary <= 20000;
d) Select * from staff where salary >20000;
4.
The full form of OSI is:
a) Operating System Interconnection
b) Operating System Information
c) Open System Interface
d) Open System Interconnection
6. Which
JavaScript method is used to write HTML output?
a) console.log()
b) document.output()
c) document.write()
d) document.writeHTML()
7. Which sign
is used to declare variables in PHP?
a) @
b) *
c) ^
d) $
8.
Which of the following is not an OOPs concept?
a) Inheritance
b) Polymorphism
c) Data Abstraction
d) Exception
9.
What is the primary goal of the system Testing
phase in SDLC?
a) Creating system design
b) Gathering requirement
c) Identifying and fixing defects
d) Writing code
SET 18
Q1. Find the error in the following SQL
statement.
SELECT * ;
(a) No error
(b) No table mentioned
(c) depends
(d) None
Q2. What identifies a row in a table as unique?
(a) Main Key
(b) Regular Key
(c) Primary Key
(d) Foreign Key
Q3. The location of a resource on the internet is
given by its _______?
(a) Protocol
(b) URL
(c) Email ID
(d) None
Q4. The term ‘HTTP’ stands for _______
(a) Hyper Text Transfer Protocol
(b) Hypertext Tracing Program
(c) Hyper Text Terminal Protocol
(d) Hyper Type Transfer Protocol
Q5. What will be the output of following
JavaScript code?
var A = "ABC";
var B = "College";
document.write(A + B);
(a) ABC
(b) ABCCollege
(c) ABC College
(d) CollegeABC
Q6. What is the output of given C program?
int a = 9 , b = 42;
printf("%d", a > b);
printf("%d", a < b);
(a) 0 0
(b) 0 1
(c) 1 0
(d) 1 1
Q7. Which of the following features must be
supported by any programming language to become a pure object-oriented
programming language?
(a) Encapsulation
(b) Inheritance
(c) Polymorphism
(d) All of the above
Q8. Which of the following is the working culture
of an Agile team?
(a) Connective
(b) Connective
(c) Collaborative
(d) Contemplative
Q9. Transaction of data of the bank is a type of
(a) Unstructured Data
(b) Structured Data
(c) Both Structured and Unstructured Data
(d) None of above
SET 19
1. ____ is composed of records and fields that hold data.
a. Field
b. Record
c. File
d. Table
2. Key which is a column that creates a relationship between two
tables.
a. Primary Key
b. Foreign Key
c. Candidate Key
d. Super Key
3. The correct query to update the record from table name STUDENT
with fields id, roll, name:
a. UPDATE student put roll=150 where id=1;
b. UPDATE student set roll=150 where id =1
c. UPDATE student SET roll=150 WHERE id=1;
d. UPDATE student roll=150 WHERE id=1;
4. Hardware component without which a computer cannot be connected
over a network.
a. Modem
b. Router
c. NIC
d. Bridge
5. There are two general areas in HTML document where JavaScript can
be placed.
a. Between <head> or <body>
b. Between <title> or <body>
c. Between <body> or <title>
d. None of the above
6. What will be the output of the following code snippet?
<script type="text/javascript">
a = 5 + "9";
document.write(a);
</script>
a. Compilation Error
b. Runtime Error
c. 14
d. 59
7. What is the output for this program?
#include <stdio.h>
void main () {
int a=5;
int *x=&a;
printf ("%d",
x);
}
a. 5
b. Memory address of x
c. Memory address of a
d. null
8. In this phase the software is checked for bugs and verifies its
performance before delivery to users.
a. Requirement Collection
b. Design
c. Development
d. Testing
9. PHP refers to
a. Hyper High Program
b. Hypertext Preprocessor
c. Hyper Preprocessor
d. Hypertext Processor
SET 20
1. What will be the result of num variable after execution?
int num = 58;
num %= 11;
58 % 11 = 3
Answer: a. 3
2. Which of the following keywords is used to define a variable in
JavaScript?
a. Var
b. Let
c. both a and b
d. none of the above
3. Which of the following is used to display the output in PHP?
a. Echo
b. write
c. print
d. Both (a) and (c)
4. Correct way of defining a variable in PHP:
a. $variable name = value;
b. $variable_name = value;
c. $variable_name = value
d. $variable name as value;
5. Which feature of OOPS describes the reusability of code?
a. Abstraction
b. Encapsulation
c. Polymorphism
d. Inheritance
6. Which normal form removes partial dependency?
a. First
b. Second
c. Third
d. BCNF
7. SQL command used to insert a row into a table:
a. Select
b. Create
c. Insert
d. Drop
8. Flipkart, Amazon, belong to which type of E-commerce:
a. B2B
b. B2C
c. P2P
d. C2B
9. Cloud computing is a kind of ............. based computing.
a. Big data
b. IoT
c. Internet
d. Bluetooth
SET 21
1) Which of the following is not an example of DBMS?
a. MySQL
b. Google
c. IBM DB2
d. MS-Access
2) Correct code to display “Scripting Language”?
a. System.out.println
b. println
c. response.write
d. document.write
3) Which type of topology is best suited for large businesses that
must carefully control and coordinate the operation of distributed branches?
a. Video conference
b. Telnet
c. FTP
d. None of them (The correct answer is "Star topology",
which is not listed)
4) FILE is of type…
a. int type
b. char * type
c. struct type
d. None of them
5) IoT stands for...
a. Internet of Thumb
b. Internal of things
c. Internet of though
d. Internet of things
6) What is the minimum number of functions to be present in a C
program?
a. 8
b. 32
c. 5
d. 1 (At least the main() function is required)
7) In the … … … transmission mode, communication is bidirectional
a. Simplex
b. Half-duplex
c. Full-duplex
d. Hybrid
8) What does the study of an existing system refer to?
a. Feasibility Study
b. System Testing
c. Feasibility Study
d. System Analysis
9) … … … is the use of various services, such as software
development platforms, servers, storage, and software, over the Internet.
a. SDLC
b. e-commerce
c. e-business
d. Cloud Computing
SET 22(Herald 2025)
1. Which SQL
keyword is used to retrieve data from a table?
a) SELECT
b) WHERE
c) FROM
d) JOIN
Note: The SELECT keyword is used to query data from
a table in SQL.
2. Which of
the following techniques is used to grant privileges to users in a database?
a) Authentication
b) Authorization
c) Isolation
d) Backup
Note: Authorization is the process of granting
specific privileges or permissions to users in a database, allowing them access
to certain resources.
3. Which
JavaScript function is used for input?
a) alert()
b) prompt()
c) confirm()
d) console.log()
Note: The prompt() function in JavaScript is used
to take input from the user through a dialog box.
4. What is
the type of inheritance shown in the following figure?
a) Single inheritance
b) Multilevel inheritance
c) Hierarchical inheritance
d) Multiple inheritance
Note: Multilevel inheritance occurs when a class
inherits from another class, and that class is derived from another class,
forming a hierarchy.
5. System
Requirement Specification (SRS) document is used in which stage of software
development?
a) Planning
b) Analysis
c) Development
d) Testing
Note: The System Requirement Specification (SRS)
document is produced in the analysis phase of software development, detailing
the functional and non-functional requirements.
6. What is
not a service of cloud computing?
a) SaaS
b) PaaS
c) IaaS
d) NaaS
Note: NaaS (Network as a Service) is not considered
a standard service in cloud computing, while SaaS, PaaS, and IaaS are widely
recognized models.
7. Data is
represented in bits in which layer of the OSI model?
a) Physical
b) Data link
c) Network
d) Presentation
Note: Data is represented in bits at the physical
layer of the OSI model, which is responsible for transmitting raw data over
physical connections.
8. Which of
the functions is used to read a character from a file?
a) getc()
b) getch()
c) getchar()
d) putc()
Note: The getc() function is used in C to read a
single character from a file.
9. How many
modes of communication are there?
a) 1
b) 2
c) 3
d) 4
Note: There are three modes of communication:
unidirectional(simplex), bidirectional(half-duplex), and
multidirectional(full-duplex). These modes describe how data is transmitted
between parties.
SET 23(HISSAN 2025 M1)
1. Which
database language is used for defining schema structures?
a) DML
b) DDL
c) DCL
d) TCL
Note: DDL (Data Definition Language) is used to define the
structure of the database, like creating tables, altering structures, and
deleting them. Commands: CREATE, ALTER, DROP.
2. Which of
the following operations are used to extract data from a database?
a) SELECT
b) DELETE
c) UPDATE
d) INSERT
Note: SELECT is used to fetch data from a table.
Other options: DELETE: removes records,
UPDATE: modifies data, INSERT: adds new records
3. Which of
the following is NOT a valid PHP data type?
a) String
b) Float
c) Character
d) Boolean
Note: PHP uses strings to represent characters; there's no
separate char type like in C or Java.
Valid types: String, Integer, Float, Boolean, Array, Object, etc.
4. Which
symbol is used for single-line comments in JavaScript?
a) //
b) /* */
c) <!-- -->
d) **
Note: // is used for single-line comments, while /* */ is
for multi-line.
5. What is
the default return type of a function in C if no return type is specified?
a) void
b) int
c) char
d) float
Note: In older C standards (like K&R), if no return type is
mentioned, int is assumed by default. It's best practice now to
explicitly declare return types.
6. Which
network device is used to connect multiple networks together?
a) Hub
b) Switch
c) Router
d) Repeater
Note: A router connects different networks and directs data
between them.
Hub: connects devices in a LAN, Switch: smarter hub for LAN,
Repeater: boosts signals
7. What is
cloud computing?
a) A type of software
b) A type of hardware
c) The delivery of computing services over the internet
d) A programming language
Note: It includes services like storage, databases, servers,
networking, and software, hosted remotely and accessed via the internet.
8. Which of
the following is NOT a principle of OOP?
a) Encapsulation
b) Inheritance
c) Compilation
d) Polymorphism
Note: Main principles of Object-Oriented Programming are:
Encapsulation, Inheritance, Polymorphism
Compilation is a general programming concept, not specific to OOP.
9. Which of
the following SDLC models is also known as the "linear-sequential
model"?
a) Spiral Model
b) Waterfall Model
c) Agile Model
d) V-Model
Note: Waterfall is a linear approach where each phase
(Requirement, Design, Implementation, etc.) must be completed before the next
begins. It’s simple but rigid.
SET 24(HISSAN 2025 D1)
1. The key
that identifies each record uniquely, is called
a) Primary Key
b) Record Key
c) Unique Key
d) Keyword
2. Which SQL
statement is used to modify data in an existing table?
a) CREATE
b) ALTER
c) UPDATE
d) DELETE
3. Which of
the following is used to display the output in PHP?
a) echo
b) print
c) ? write
d) both (a) and (b)
4. What is
the correct way to write “if” statement in JavaScript?
a) if i=7 then.
b) if (i == 7)
c) if i==7
d) if i = 7
5. A function
which calls itself is called a ………
a) Self-Function
b) Auto Function
c) Recursive Function
d) Static Function
6. Which
device provides path for the packets for data transmission?
a) Hub
b) Router
c) Switch
d) Repeater
7. PaaS
stands for…..
a) Public as a service
b) Platform as a Service
c) Protocol of a Service
d) Policy as a Service
8. Which
feature of OOP indicates code reusability?
a) Abstraction
b) Polymorphism
c) Encapsulation
d) Inheritance
9. Which SDLC
model is best suited for projects where requirements change frequently?
a) Waterfall model
b) Spiral model
c) Agile model
d) V-shaped model
SET 25(PABSON 2025)
1. In which of the following switching
methods, the message is divided into small packets?
a. Message switching b. Packet switching
c. Virtual switching d. None of the these
Note: In packet
switching, messages are divided into small packets before transmission.
2. A _________ set of rules that
governs data communication
a. Protocols b. Standards
c. RFCs d. Servers
Note: Protocols are a
set of rules that govern data communication.
3. Which of the following is not the
phase of classical waterfall model?
a. Feasibility Study b. Requirement Analysis
c. Building Protype d. Maintenance
Note: The classical
waterfall model does not include prototyping; it follows a linear and
sequential approach.
4. Which of the following is generally
used for performing tasks like creating the structure of the relations,
deleting relation?
a. DML(Data Manipulation Language)
b. Query
c. Relational Schema
d. DDL(Data Definition Language)
Note: DDL is used for
defining and modifying database structures.
5. The term "DFD" stands for?
a. Data file diagram
b. Data flow document
c. Data flow diagram
d. None of the above
Note: DFD stands for
Data Flow Diagram, which represents the flow of data in a system.
6. What will be the output of the
following code snippet?
#include
<stdio.h>
a. 3 5 b. 3 3 c. 5 5 d. 5 3
int main() {
int a = 3, b = 5;
int t = a;
a = b;
b = t;
printf("%d %d", a, b);
return 0;
}
Note: The code swaps the values of a and
b using a temporary variable t.
7. What is the size of a C structure.?
a. C structure is always 128 bytes.
b. Size of C structure is the total
bytes of all elements of structure.
c. Size of C structure is the size of
largest element.
d. None of the above
Note: The size of a
structure depends on the sum of its elements, considering padding and
alignment.
8. String values in PHP must be enclosed
within -
a. Double Quotes "" b. Single
Quotes ' '
c. Both (a) and (b) d. None
of the above
Note: String values in
PHP can be enclosed in either single (' ') or double (" ") quotes.
9. Which of the following variable name
is invalid?
a. $newVar b. $new_Var
c. $new-var d. All of the above
Note: In PHP, variable
names cannot contain hyphens (-).
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home